Home > blogpost > RPM Specs argument handling

RPM Specs argument handling

November 3rd, 2009 Leave a comment Go to comments

When building RPM’s it is possible to use post and pre install/uninstall hooks. These get sometimes some parameters to determine if you are upgrading or uninstalling. This could be handy when creating users while installing. So it is crucial to know these and I always forget them

install upgrade uninstall
%pretrans $1 == 0 $1 == 0 (N/A)
%pre $1 == 1 $1 == 2 (N/A)
%post $1 == 1 $1 == 2 (N/A)
%preun (N/A) $1 == 1 $1 == 0
%postun (N/A) $1 == 1 $1 == 0
%posttrans $1 == 0 $1 == 0 (N/A)
Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.