Re: So, what _is_ the right thing to do?

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

 



On Thu, Apr 15, 2004 at 12:52:15PM -0700, Christian Goetze wrote:
> > Well, I filed Bug nr. 119286, which got closed out as "wontfix", with
> > the laconic comment:
> >
> > ------- Additional Comments From jbj@xxxxxxxxxx  2004-04-07 12:54
> > ------- Using --prefix to qualify upgrade/erasure ain't the right thing
> > to do.
> 
>  Well, what _is_ the right thing to do, and how do I selectively erase a
>  particular rpm without erasing all of them?

The right thing is not to have multiple identical rpms only differentiated by
prefix installed.  

In rpm-python addErase can take an int of the hdr offset - obtainable from
mi.instance, completely untested - but you may be able to do something like:

import rpm
ts=rpm.ts()
mi = ts.dbMatch(rpm.RPMTAG_NAME, "relocator")
mi.pattern(rpm.RPMTAG_PREFIXES, rpm.RPMMIRE_DEFAULT, "/usr/opt")
for h in mi:
	instance = mi.instance()
       	ts.addErase(instance)

Paul


_______________________________________________
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