0

I have currently installed a version of rpm (x.rpm) that needs to be renamed in the next version (y.rpm). To accomplish this, I decided to obsolete the old (x.rpm) rpm. When I run the rpm –Uvh y.rpm on the new rpm here are the steps that takes place:

-Pre-transaction

-Pre-install

-Post install

-Pre uninstall

-Post uninstall

However, my post-uninstall script has some clean up steps that goes and does an rm –rf for some folders. The post-uninstall for both version of the rpm is exactly the same so now, when I installed the new rpm (y.rpm), some folders that were required by the new version gets removed because of the post-uninstall script.

How do I get around this issue?

Any help is greatly appreciated. Thank you.

Jolta
  • 2,620
  • 1
  • 29
  • 42

1 Answers1

0

Here is what i would do:

  1. create a newer version of x.rpm with changed post uninstall script that doesn't remove folders
  2. update x.rpm on all machines
  3. wait for a while (depending if this is an in-house project or an open project on the internet)
  4. start deploying y.rpm
user1403360
  • 931
  • 1
  • 12
  • 17