[Yum-devel] [PATCH] Exceptions in depsolve.py (3_2_X branch, CentOS 5.4 installer)

James Antill james at fedoraproject.org
Fri Nov 13 00:22:54 UTC 2009


On Thu, 2009-11-12 at 17:32 -0500, Charlie Brady wrote:
> On Thu, 12 Nov 2009, James Antill wrote:
> 
> >>>> Aren't there two bugs? .ver member on po, and .inPrcoRange on nextpo?
> >>>
> >>> .ver will be == .version for any yum object above YumAvailablePackage.
> >>
> >> Not in this case, .ver doesn't exist, hence the exception.
> >> IIRC, po is an instance of PackageObject, and PackageObject doesn't have
> >> .ver.
> >
> > How can po be a PackageObject? I find it really unlikely, and having a
> > quick look in the rhel5-base branch of anaconda I don't see how that
> > could happen. Anaconda isn't creating any PackageObject's by hand, and
> > yum doesn't use that class directly.
> 
> OK I was wrong there. However, I'm not wrong to say that po does not 
> have a .ver, python told me:
> 
>   AttributeError: TransactionMember instance has no attribute 'ver'

 Right, this is the same bug. Because the "po" is a "txmbr". Ie. instead
of something inheriting from PackageObject, like
YumSqliteAvailablePackage, it's a TransactionMember.

> > I see this on 393, in the rhel5-base branch:
> >
> >                if self.tsInfo.exists(dep.pkgtup):
> >                    pkgs = self.tsInfo.getMembers(pkgtup=dep.pkgtup)
> >                    member = self.bestPackagesFromList(pkgs)[0]
> >
> > ...which is wrong (getMembers() returns txmbrs, not pkgs) and looks like
> > the traceback you have.
> > I'm not 100% sure that's the exact version in RHEL-5.4 though, and this
> 
> I don't see those lines anywhere in stage2.img from CentOS 5.4:
> 
> bash-3.2$ grep -r bestPackagesFromList /tmp/foo/usr/lib/python2.4/site-packages
> /tmp/foo/usr/lib/python2.4/site-packages/yum/__init__.py:    def bestPackagesFromList(self, pkglist, arch=None, single_name=False):
> /tmp/foo/usr/lib/python2.4/site-packages/yum/__init__.py:                            mypkgs = self.bestPackagesFromList(mypkgs,
> /tmp/foo/usr/lib/python2.4/site-packages/yum/__init__.py:                    lst.extend(self.bestPackagesFromList(pkgs))
> /tmp/foo/usr/lib/python2.4/site-packages/pirut/GroupSelector.py:        pkgs = ayum.bestPackagesFromList(pkgs)
> bash-3.2$

 The above lines are in the anaconda yuminstall.py file. If you'll need
to pass in the .po of each of those txmbrs ... and then for the result
lookup the correct txmbr again using the pkgtup.



More information about the Yum-devel mailing list