Re: rpmbuild and upgrades

From: Markku Kolkka (markkuk_at_tuubi.net)
Date: 08/25/05

  • Next message: Jim Cornette: "Re: grub.conf emptied, and now i get kernel panic?"
    To: fedora-list@redhat.com
    Date: Thu, 25 Aug 2005 13:53:11 +0300
    
    

    Mike McGrath kirjoitti viestissään (lähetysaika keskiviikko, 24.
    elokuuta 2005 19:25):
    > I'm having difficulty with building an RPM file to upgrade.
    > The issue comes when I need to add and delete a user. In the
    > spec file I have it creating the user in %pre and removing the
    > user in %postun. I'm using useradd and userdel to create and
    > delete the user. When I build and install the RPM everything
    > works as expected, same goes when I remove it. But when I do
    > an rpm -U for an upgrade for some reason when all is said and
    > done the user does not exist. Anyone know what's going on?

    In an upgrade, the new package is installed first and %pre is
    executed. Then the old package gets removed and %postun is
    executed. You end up with the user deleted.

    You should check the numercal argument given to %pre and %postun
    scripts to distinguish between install/delete and upgrade. See:
     
    http://fedora.redhat.com/participate/developers-guide/ch-rpm-building.html#s1-rpm-spec-file

    -- 
     Markku Kolkka
     markku.kolkka@iki.fi
    -- 
    fedora-list mailing list
    fedora-list@redhat.com
    To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
    

  • Next message: Jim Cornette: "Re: grub.conf emptied, and now i get kernel panic?"

    Relevant Pages

    • Re: Recommendation please
      ... If the latter you may find the new perl in ... Everyone has their own ideas of where to install it. ... That is again why it is better to use the rpm for your ... >> do not want to upgrade the OS. ...
      (comp.os.linux.misc)
    • Re: Checking dependencies in packages selected for installation
      ... should not take more than a few minutes to compile a list of packages ... This is not a complete FC 4 install. ... I can import rpm dependencies into my own database ... If the 800lb gorilla I deal with, daily, is a typical RHAS licensee -- and I have no reason to think that they're not -- most RHAS customers do not upgrade their servers. ...
      (Fedora)
    • Re: [opensuse] How To Upgrade To The Newest Flash
      ... I´d like to upgrade to newer flash player. ... it,just install new package. ... The best suggestion I can offer is to wait for the Suse rpm to come ...
      (SuSE)
    • Re: Fedora core 2 upgrade problems: x.org and kernel
      ... >> I finally managed to do the upgrade. ... >> problem right now is that I still have the 2.4 kernel and I also have ... >> I tried to do a fresh install from the CDs, ... > a bit work and time, to get you started with this use rpm -qa ...
      (linux.redhat.install)
    • Re: I am NOT a troll
      ... listen to the track and then when one song ended and one was about ... I -e'd the rpm, re-installed it, same thing. ... couldn't because of gtk - I couldn't upgrade gtk, ...
      (alt.os.linux.suse)