Find the answer to your Linux question:
Results 1 to 3 of 3
Hello everyone, i m creating the rpm package using maven-rpm plugin. which has few other rpm package dependencies. when i install it using yum install, it works fine. install everything ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2012
    Posts
    19

    post uninstall script wont work : spec & rpm from Maven - RPM- plugin


    Hello everyone,
    i m creating the rpm package using maven-rpm plugin. which has few other rpm package dependencies. when i install it using yum install, it works fine. install everything in the right place.
    but, when i do yum erase, it removes the package but does not remove all the other RPMs that was installed as dependencies.

    have tried:
    preremove scriptlet tags and postremove scriptlet tags :doesn't work, won't run the script and freezes. when i press ctrl+c then show : error with pre/postun script.......

    rpm -e --nodeps {rpm} but only removes main rpm.

    any suggestions? any sample for postremove scriptlet for plugin???


    thank you in advance.

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Hi,

    Yeah, yum is not so sexy when it comes to that. I've wanted the same before, too. Typically, I have an install/uninstall program (bash/perl script) that handles all dependencies (even though yum does the actual install). That way, when I uninstall, I remove everything that I truly want gone.

    In your case, if you wanted to build the capability into the RPM itself, you could do an rpm query of the entire database in %pre, then do another one in %post, then write the differences to some sort of manifest file, which would be owned by the RPM. Even if you had this list, you wouldn't want to remove these RPMS from your system within the uninstallation of the original RPM - that is not nice. You'd probably have to have an external script/process handle the safe removal of all of them.

  3. #3
    Just Joined!
    Join Date
    Dec 2012
    Posts
    19
    thank you atreyu.
    yes, i tried to include in the RPM before and was getting error everytime. thats why i had it in external script right now. i was just wondering if i could include it in the RPM and make it more efficient.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •