RPM runs %post, yum does not ...

Brian Long brilong at cisco.com
Fri Nov 4 14:06:58 UTC 2005


On Fri, 2005-11-04 at 00:42 -0500, Klaus Steden wrote:
> Call off the dogs.
> 
> It seems that scriptlets run in a confusing order ...
> 
> %pre (new package)
> %post (new package)
> %preun (old package)
> %postun (old package)
> 
> ... which meant that my stupid RPMs were stepping on each other.
> 
> It's times like these that I miss vendor documentation.

You need to apply $1 logic in your scriptlets.

In %post, if $1 = 1, then create the symlink.  If $1 -gt 1, only create
the symlink if it doesn't exist (i.e. version changes).  In %preun, if
$1 = 1, remove your symlink.  Something like that.

/Brian/

-- 
       Brian Long                      |         |           |
       IT Data Center Systems          |       .|||.       .|||.
       Cisco Linux Developer           |   ..:|||||||:...:|||||||:..
       Phone: (919) 392-7363           |   C i s c o   S y s t e m s




More information about the Kickstart-list mailing list