[packagekit] [Yum-devel] Re: yum error?

Robin Norwood rnorwood at redhat.com
Mon Mar 17 09:59:43 PDT 2008


On Mon, 17 Mar 2008 10:29:24 -0400
James Antill <james.antill at redhat.com> wrote:

> 
> On Mon, 2008-03-17 at 13:22 +0100, Tim Lauridsen wrote:
> > Richard Hughes wrote:
> > > yum from git:
> 
>  I've just checked a  patch in which should fix this:
> 
> commit f2211e9115e9ffe9cd635fd999b7c2a7a108db5f
> 
> ...but that's more a defensive fix than anything, as I don't see how
> that exception is possible in a single yum run ... could you explain
> what PK is doing? What does print self._oldRepoMDData show?
>  Are you doing anything weird, like "del repos.repoXML"?

Well, we are reusing the yum object, so that's probably why we're seeing this issue.  fwiw, I haven't been able to reproduce it yet.  As far as repo setup, we are doing:

            for repo in self.yumbase.repos.listEnabled():
                repo.metadata_expire = 60 * 60 * 1.5 # 1.5 hours, the default
                repo.mdpolicy = "group:primary"

(This is to set the cache back to a more aggressive level for actually doing an update - we're less aggressive for querying options for performance reasons)

-RN

> > > Exception in thread Thread-5:
> [...]
> > >   File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line
> > > 1049,
> > in _getRepoXML
> > >     self._loadRepoXML(text=self)
> > >   File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line
> > > 1032, in _loadRepoXML return self._groupLoadRepoXML(text)
> > >   File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line
> > > 1023, in _groupLoadRepoXML if self._commonLoadRepoXML(text):
> > >   File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line
> > > 904, in _commonLoadRepoXML if not self._groupCheckDataMDNewer():
> > >   File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line
> > > 862, in _groupCheckDataMDNewer old_repo_XML =
> > > self._oldRepoMDData['old_repo_XML'] KeyError: 'old_repo_XML'
> 
> > Looks like a bug in the meta group code, you can work around it by 
> > comment out repo.mdpolicy = "group:all" in _check_init() in 
> > yumDBUSBackend.py, until it is fixed in upstream yum
> 
>  That's not true, even moving from "group:all" to "instant" will still
> take the same code path through _commonLoadRepoXML().
> 
> > James A:
> > Look like you need to check if 'old_repo_XML' is a key in 
> > self._oldRepoMDData, like you do in another part of the code.
> > 
> > Tim
> > _______________________________________________
> > Yum-devel mailing list
> > Yum-devel at linux.duke.edu
> > https://lists.dulug.duke.edu/mailman/listinfo/yum-devel


-- 
Robin Norwood
Red Hat, Inc.

"The Sage does nothing, yet nothing remains undone."
-Lao Tzu, Te Tao Ching



More information about the PackageKit mailing list