Re: Having an rpm automatically uninstall a different rpm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 26, 2004 at 12:15:39PM -0500, Keegan, Gordon wrote:

> I am building a package (foo) on RHAS2.1 that will replace an existing
> package (bar).  I would like to have the install/upgrade operation for
> foo.rpm look for an existing bar.rpm and remove it if found.  I have
> tried putting 'rpm -qa|grep bar / rpm -e bar' in the %pre section, but
> it fails (can't get lock on rpm db.)  I have also tried to add an

Definitely the wrong method.

> "Obsoletes: bar" tag, which seems to be recognized when I build the
> package, but doesn't remove bar.rpm.  Simply naming the new package
> bar.rpm and incrementing the version number is not an option (for
> non-technical reasons.)
> 
> Has anyone else run into this (and hopefully found a solution :)

Do you install foo with -i or -U?  I guess *un*installing packages
is only done when doing -U.  IMHO "Obsoletes: bar" is the way to go.

But you might want to add "Conflicts: bar" too, to prevent both
being installed when doing -i.

(All suggestions just from my head, just what I would try...)

-- 
--    Jos Vos <jos@xxxxxx>
--    X/OS Experts in Open Systems BV   |   Phone: +31 20 6938364
--    Amsterdam, The Netherlands        |     Fax: +31 20 6948204


_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux