Question regarding upgrading packages from a new developer

FlorianFesti ffesti at
Tue Oct 12 20:23:29 UTC 2010

  On 10/12/2010 08:23 PM, Eric Hudish wrote:
> I'm new to building rpm based packages and have some questions regarding
> best practices and management of a repository.
> I built a base rpm. It installs correctly without issue. The uninstall
> section removes a specific directory root, say something like
> [/usr/share/myproject] where I put some general data for use.
> Here's where I'm getting confused and can find little information when
> googling:
> * I then built an upgrade version which contained all the same
> configuration files and upgraded programs. When running 'rpm -U' it
> proceeds to delete the [/usr/share/myproject] directory because of the
> uninstall executing AFTER the update.
> Here's where I'm confused.
> First: I'm surprised the unistall is executed at all on an upgrade...but
> I can imagine the reasons for it. I've seen the documentation so...I can
> live with it I guess.
> Second: I would think the originating package would be uninstalled
> before the new package or update. Why would it be done after?
I got the feeling that you are deleting files in the scriptlets. This 
should be avoided and is not necessary for the very most cases. Rpm 
takes care of the files itself and will replace or delete files when 

Removing the packages first before installing the new version - while 
sounding cleaner at first - puts the system in a non working state in 
between. This would cause serious problems for running services or even 
scriptlets which rely on programs that just might being updated.


More information about the Rpm-list mailing list