[Yum-devel] [PATCH 3/3] Change ui_from_repo to compare releasever, and print if it's different

James Antill james at fedoraproject.org
Mon Nov 23 17:35:47 UTC 2009


On Mon, 2009-11-23 at 11:11 -0500, Seth Vidal wrote:
> 
> On Mon, 23 Nov 2009, James Antill wrote:
> 
> > ---
> > yum/packages.py |    7 ++++++-
> > 1 files changed, 6 insertions(+), 1 deletions(-)
> >
> > diff --git a/yum/packages.py b/yum/packages.py
> > index fad6640..c2b63c4 100644
> > --- a/yum/packages.py
> > +++ b/yum/packages.py
> > @@ -607,7 +607,12 @@ class YumAvailablePackage(PackageObject, RpmBase):
> >
> >     def _ui_from_repo(self):
> >         if self.repoid == 'installed' and 'from_repo' in self.yumdb_info:
> > -            return '@' + self.yumdb_info.from_repo
> > +            end = ''
> > +            if (self.rpmdb.releasever is not None and
> > +                'releasever' in self.yumdb_info and
> > +                self.yumdb_info.releasever != self.rpmdb.releasever):
> > +                end = '/' + self.yumdb_info.releasever
> > +            return '@' + self.yumdb_info.from_repo + end
> >         return self.repoid
> >     ui_from_repo = property(fget=lambda self: self._ui_from_repo())
> >
> 
> these patches are 'sorta' okay - but I would like to see A LOT more code 
> documentation for why comparing 'releasever' is useful in an rpmsack.
> 
> it would make more sense to me to make it not comparable b/c it doesn't 
> make any sense.

 Well I can think of two main cases atm:

1. User does "yum --enablerepo=rawhide install blah", then does update
from F11 => f12. It's helpful to see "blah @rawhide/11" to note that you
haven't got it from "current rawhide", aka. F13.
 Also stuff like old kernel* hanging around if you do the move via. yum.

2. With the Fedora change to having F13 really early, people will be
able to use --releasever=13 pretty soon ... so it'd be nice to see
"@fedora/13" instead of just "@fedora".

...but if you disagree, fair enough ... but please ACK the first
patch :)



More information about the Yum-devel mailing list