[Yum-devel] Problem using doConfigSetup()

seth vidal skvidal at linux.duke.edu
Fri Feb 16 04:31:07 UTC 2007


On Wed, 2007-02-14 at 11:29 -0500, Brad Smith wrote:
> > The standard fedora-core.repo uses $releasever to determine the version,
> > which is looked up from rpmdb based on fedora-release package version.
> > Since you're pointing yum to alternate root I think it's looking for rpmdb
> > within that root (eg /home/brad/Work/yum/trackerRoot/var/lib/rpm), not
> > finding it and so the baseurl/mirrorlist for that repo can't be completed
> > it fails.
> 
> Indeed, that was the problem. When I replace $releasever with an
> explicit number everything works fine. This actually touches on an
> important issue that I will need to deal with in implementation,
> though. Tracker doesn't just index for a single arch/ver combination,
> but for pretty much all of them. Hence I will need to, perhaps using a
> single config file but different root directories for each, populate
> each repo for every arch/ver it supports while indexing.
> 
> As such, I need a way to set the arch/ver on-the-fly. I assumed this
> would be possible by setting eg my.conf.yumvar['releasever'] just
> after doConfigSetup(), but I still get the bad url problem when I do
> that.
> 
> Is there a way to override the values of basearch, arch and releasever
> from within yum?
> 
> I noticed these lines in config.py:
> 
> yumvars['basearch'] = rpmUtils.arch.getBaseArch()        # FIXME make
> this configurable??
> yumvars['arch'] = rpmUtils.arch.getCanonArch()             # FIXME
> make this configurable??
> 
> ...so maybe that's just not possible yet?
> 

you don't want to do that, no. You'd do it per-config or just define it
when you set the repository up.

-sv





More information about the Yum-devel mailing list