On Wed, 2011-05-04 at 19:48 +0200, tim.laurid...@gmail.com wrote: > > > On Wed, May 4, 2011 at 3:45 PM, Seth Vidal <skvi...@fedoraproject.org> > wrote: > when we're doing collapse_libc_requires. > ultimately what's causing: > https://bugzilla.redhat.com/show_bug.cgi?id=701744 > --- > rpmUtils/miscutils.py | 4 ++++ > yum/packages.py | 9 +++++++-- > 2 files changed, 11 insertions(+), 2 deletions(-) > > diff --git a/rpmUtils/miscutils.py b/rpmUtils/miscutils.py > index cdb1cb6..aea4550 100644 > --- a/rpmUtils/miscutils.py > +++ b/rpmUtils/miscutils.py > @@ -54,6 +54,10 @@ def compareEVR((e1, v1, r1), (e2, v2, r2)): > #print '%s, %s, %s vs %s, %s, %s = %s' % (e1, v1, r1, e2, > v2, r2, rc) > return rc > > +def compareVerOnly(v1, v2): > + """compare version strings only using rpm vercmp""" > + return compareEVR(('', v1, ''), ('', v2, '')) > + > def checkSig(ts, package): > """Takes a transaction set and a package, check it's sigs, > return 0 if they are all fine > diff --git a/yum/packages.py b/yum/packages.py > index 264aa9a..e745a1a 100644 > --- a/yum/packages.py > +++ b/yum/packages.py > @@ -31,11 +31,12 @@ import warnings > from subprocess import Popen, PIPE > from rpmUtils import RpmUtilsError > import rpmUtils.miscutils > -from rpmUtils.miscutils import flagToString, stringToVersion > +from rpmUtils.miscutils import flagToString, stringToVersion, > compareVerOnly > import Errors > import errno > import struct > from constants import * > +from operator import itemgetter > > import urlparse > urlparse.uses_fragment.append("media") > @@ -1139,7 +1140,11 @@ class > YumAvailablePackage(PackageObject, RpmBase): > if hasattr(self, '_collapse_libc_requires') and > self._collapse_libc_requires: > libc_requires = filter(lambda x: > x[0].startswith('libc.so.6'), mylist) > if libc_requires: > - best = sorted(libc_requires)[-1] > + print libc_requires > + rest = sorted(libc_requires, > cmp=compareVerOnly, key=itemgetter(0)) > + best = rest.pop() > + if best[0].startswith('libc.so.6()'): > + best = rest.pop() > newlist = [] > for i in mylist: > if i[0].startswith('libc.so.6') and i != > best: > -- > 1.7.4 > > _______________________________________________ > Yum-devel mailing list > Yum-devel@lists.baseurl.org > http://lists.baseurl.org/mailman/listinfo/yum-devel > > The print statement should not be there :) else ACK > >
yep - james caught that, too. sorry fixed -sv _______________________________________________ Yum-devel mailing list Yum-devel@lists.baseurl.org http://lists.baseurl.org/mailman/listinfo/yum-devel