[Yum-devel] include directive and $variables in yum.conf/repos conf

seth vidal skvidal at linux.duke.edu
Fri Sep 29 17:25:51 UTC 2006


On Fri, 2006-09-29 at 18:17 +0100, Menno Smits wrote:
> Justin Moore wrote:
> >> So, we could use the confpp class from yum 2.4.X that Ryan and Michael
> >> wrote - but that would mean that:
> >>
> >> include=http://foo/$releasever/$basearch
> >>
> >> wouldn't work - b/c the $variables are not known yet. confpp assembles
> >> the whole file.
> >>
> >> so - what we're trying to figure out here is what should the behavior
> >> be?
> > 
> >    It looks like you're getting configuration information from two
> > sources: config files and the "environment" (rpmdb, os info, etc).
> > Right now the latter is read in when you read the 'main' section.  Why
> > not have a separate getSystemVars (or such) method?  Call that first
> > before reading any files.
> > 
> >    Along those lines, you could grab the euid in that function as
> > opposed to in the main doConfigSetup.
> 
> That pretty much makes sense. The only token that can't be determined 
> before parsing config files is $releasever as it depends on the 
> installroot and distroverpkg options. $basearch and $arch are set 
> without consulting any options and the $YUMn tokens are already set at 
> startup.
> 
> On a related note, is it a problem that getCanonArch() ignores 
> installroot? What if installroot actually maps to another system (eg. 
> loopback image) with a different arch?

shouldn't matter - it matters what arch we're running ON b/c %scriptlets
won't be able to work if we were installing pkgs for another arch.


-sv





More information about the Yum-devel mailing list