[Yum] Re: pkgdir not getting set, packages ending up in /

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I did come up with a hack to work around this problem. I can't seem to
get to the root of it but this patch gets things working.

So if anyone else is having this problem try this patch.

diff -uNr yum-2.4.2.orig/yum/repos.py yum-2.4.2/yum/repos.py
--- yum-2.4.2.orig/yum/repos.py 2005-11-06 18:52:06.000000000 -0600
+++ yum-2.4.2/yum/repos.py      2006-03-24 09:13:23.384126562 -0600
@@ -135,6 +135,14 @@
         return repolist
     def getRepo(self, repoid): +       # hack by eli, FIXME don't
know why this isn't getting set all the time
+        import config +        yumconfig =
config.yumconf(configfile='/etc/yum.conf', root='/')
+        ccachdir=yumconfig.getConfigOption('cachedir') +       
self.repos[repoid].cachedir="%s/%s"%(ccachdir,repoid)
+        self.repos[repoid].pkgdir="%s/%s/packages"%(ccachdir,repoid)
+        self.repos[repoid].hdrdir="%s/%s/headers"%(ccachdir,repoid)
+       #END HACK
         try:
             return self.repos[repoid]
         except KeyError, e:


On 3/22/06, Eli Criffield <elicriffield@xxxxxxxxx> wrote:
> When i run yum update or yum install any package or header that gets
> downloaded ends up in / and not /var/cache/yum/repo/packages.
>
> The problem is somewhere in getRepo() after it loads the (slightly
> modified) versionlock plugin.
>
> If i remove the versionlock plugin everything works.
>
> With the versionlock plugin in place when getRepo() gets called from
> localPkg() or locaHdr() in YumAvalibablePackage() the repo object it
> returns has no pkgdir attribute, or i should say the pkgdir attribute
> is empty.
>
> When getRepo() gets called from downloadHeader() in __init__ right
> after it calls localHdr() the repo object it returns _does_ have
> pkgdir set correctly.
>
> I'm not sure why, but  RepoStorage.add() is being called twice once
> before the plugin loads and once after, both times its being called
> from getReposFromConfig() from __init__, but i don't see whats calling
> getReposFromConfig.
>
> I suspected that the second time it calls getReposFromConfig() it was
> missing some data but the repo object from getRepo() called from
> downHeader() had the correct data and that's after the second call
> from getReposFromConfig().
>
> Any ideas why its not setting pkgdir for repo objects and my headers
> and packages are ending up in / ?
>
> oh yeah, this is suse enterprise linux 9, yum 2.4.2, and versionlock
> slightly modified from whats on the wiki.
>
> Thanks
>
> Eli Criffield
>

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux