Wolfgang Rosenauer wrote:
Hi,
Dan Stromberg schrieb:
However, now I'm finding that I can repeatably:
1) Install 3.1.0.0 of the rpm 2) -Uvh 3.1.0.3 of the rpm 3) The files under the original hierarchy disappear. The files under the secondary hierarchy become present. My %post that copies files from the secondary hierarchy to the original hierarchy doesn't seem to be getting run 4) -ivh 3.1.0.3 of the rpm 5) The files under the original hierarchy become present. It seems that my %post is getting run
It seems like %post is only happening on -ivh, not on -Uvh, even though the maximum rpm book says that -Uvh is basically just a -e and -ivh.
Has anyone seen anything like this before? Is there a fix?
rpm -U is not the same as rpm -e and rpm -i.
That is what's done with -U:
* Run %pre of new package * Install new files * Run %post of new package * Run %preun of old package * Delete any old files not overwritten by newer ones * Run %postun of old package
Wolfgang is correct. In your %preun and/or %postun, you need to check the value of $1 to determine if rpm was called with -e or -U. This is a good resource: http://www.ibm.com/developerworks/library/l-rpm3.html --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org