[Yum-devel] [PATCH 1/3] make obsoletes a little more correct vis-a-vis rpm

James Antill james.antill at redhat.com
Wed Oct 20 02:40:29 UTC 2010


On Tue, 2010-10-19 at 16:49 -0400, Seth Vidal wrote:
> when we add pkgs to be updated or installed (and they are not TrueInstalls)
> then go ahead and look through them and add any pkgs that might be Obsoleted by them
> when rpm runs the transaction. Since rpm will run it whether or not we list it when
> it comes to obsoletes
> 
> also add a counter any time we add or remove a pkg from the tsInfo so we can always know of state
> change based on that

 Somewhat of a minor quibble, but...

> +    def findObsoletedByThisMember(self, txmbr):
> +        """addObsoleted() pkgs for anything that this txmbr will obsolete"""
> +        # this is mostly to keep us in-line with what will ACTUALLY happen
> +        # when rpm hits the obsoletes, whether we added them or not
> +        for obs_n in txmbr.po.obsoletes_names:
> +            for pkg in self.rpmdb.searchNevra(name=obs_n):
> +                if pkg.obsoletedBy([txmbr.po]):
> +                    self.addObsoleted(pkg, txmbr.po)

 This should change txmbr.output_state (and state) to TS_OBSOLETING.

 Otherwise, ACK.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part
URL: <http://lists.baseurl.org/pipermail/yum-devel/attachments/20101019/270e795a/attachment.pgp>


More information about the Yum-devel mailing list