On Wed, 2011-09-21 at 10:26 +0200, Zdeněk Pavlas wrote: > --- > yum/__init__.py | 11 ++++++++++- > 1 files changed, 10 insertions(+), 1 deletions(-) > > diff --git a/yum/__init__.py b/yum/__init__.py > index 5fb7c00..756472b 100644 > --- a/yum/__init__.py > +++ b/yum/__init__.py > @@ -4271,7 +4271,16 @@ class YumBase(depsolve.Depsolve): > > # check to see if the pkg we want to install is not _quite_ the > newest > # one but still technically an update over what is installed. > - pot_updated = self.rpmdb.searchNevra(name=available_pkg.name, > arch=available_pkg.arch) > + pot_updated = [] > + for p in self.rpmdb.searchNevra(name=available_pkg.name): > + if (
Again, please try and match the style of the rest of yum ... it is far from perfect already. You should also probably add a comment here saying what you are trying to do and way ... and how it's better than just name+arch (what we had before). > + p.arch == available_pkg.arch # exact arch match > + or self.conf.obsoletes and ( > + p.arch == 'noarch' # from noarch > + or available_pkg.arch == 'noarch' # to noarch > + ) > + ): So if available_pkg.arch == 'noarch' we allow anything, right? Might even be worth having it's own "top level" test for that. Also I've no idea what the conf.obsoletes test is here for ... I meant that traditionally to have packages "move arch" we had them obsolete older versions of themselves in their specfiles. > + pot_updated.append(p) > if pot_updated and self.allowedMultipleInstalls(available_pkg): > # only compare against the newest of what's installed for > kernel > pot_updated = sorted(pot_updated)[-1:] _______________________________________________ Yum-devel mailing list Yum-devel@lists.baseurl.org http://lists.baseurl.org/mailman/listinfo/yum-devel