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

Charlie Brady charlieb-yum-devel at budge.apana.org.au
Thu Nov 12 22:32:50 UTC 2009


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'

>>> AFAIK the only bug is that nextpo is a TransactionMember and not a
>>> PackageObject.
>>
>> That is the second bug.

Can we agree on that now?

Without first line of my patch I get "no attribute 'ver'". Without second 
line I get "no attribute 'inPrcoRange'".

>> I think it's reasonable to assume that someone here is an anaconda
>> developer
>
> AFAIK none of the main anaconda developers are on this list. Although
> I'm not sure how much help you'll get for the RHEL-5 version of
> anaconda, on the anaconda ML.

OK.

>> , and cares about anaconda/yum for RHEL5.
>
> Sure.
>
>>  I can provide further
>> details if required. I'm a bit reluctant to open a bug in
>> bugzilla.redhat.com, because I'm not installing vanilla RHEL5. But I'm
>> fairly sure that the bug is latent in RHEL5, and not caused by me.
>
> 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$


> will only trigger if the yum that anaconda is using is the RHEL-5.4
> (maybe 5.3) version ... and I'm not even sure they update the yum
> version there for the RHEL-5 installs.
> But feel free to open a BZ.

OK, thanks.


More information about the Yum-devel mailing list