[Yum-devel] yumdownloader (1.1.2/3.1.6) with --installroot
Charlie Brady
charlieb-yum-devel at budge.apana.org.au
Thu Apr 12 21:16:22 UTC 2007
On Thu, 12 Apr 2007, Charlie Brady wrote:
> AttributeError: 'NoneType' object has no attribute 'name'
>
> This patch to /usr/lib/python2.4/site-packages/yum/packages.py fixed that
> little problem:
>
> def __eq__(self, other):
> # if other == None:
> # return False
> if comparePoEVR(self, other) == 0 and self.arch == other.arch and
> self.name == other.name:
> return True
> return False
This is still a problem in yum 3.1.6, but I notice fixed in CVS.
> So now I'm trying again, but with yum-3.1.6 and yum-install-1.1.2. I now find
> that yumdownloader requires various things to already exist in the
> installroot which it was happy and able to create in the earlier version.
> Specifically it expects the installroot to already include an rpmdb and cache
> directories for each repository (both of which I've found workarounds for),
> and then also demands to find a pre-cached repomd.xml file per repository.
>
> Are these intentional changes of behaviour, or are they regressions which I
> can help to debug?
Here's the problem:
...
self.conf.uid = os.geteuid()
-> if self.conf.uid != 0:
-> self.conf.cache = 1
...
After commenting out that code, and making the following changes to
yumdownloader, I find that latest releases do indeed do a *much* better
job at resolving dependencies.
--- yumdownloader-1.1.2.orig 2007-04-12 13:56:36.000000000 -0400
+++ yumdownloader-1.1.2 2007-04-12 16:40:20.000000000 -0400
@@ -24,6 +24,9 @@
from urlparse import urljoin
+from urlgrabber.progress import TextMeter
+import shutil
+
class YumDownloader(YumUtilBase):
NAME = 'yumdownloader'
VERSION = '1.0'
More information about the Yum-devel
mailing list