[Yum] more about: passing two or more variables from a python routine.

seth vidal skvidal at phy.duke.edu
Tue Sep 28 20:51:10 UTC 2004


On Tue, 2004-09-28 at 16:44 -0400, Robert G. Brown wrote:
> On Tue, 28 Sep 2004, Rick Graves wrote:
> 
> > Robert,
> > 
> > The subroutine can pass back expressions -- they do
> > not have to be reduced to variables.
> > 
> > So the last line of the subroutine could be:
> > 
> >    return expr1, expr2, ...
> > 
> > Rick
> 
> Thanks!  In which case the patch looks like the following (at the end).
> 
> Seems to (still) work, sets distribution to "redhat-release" on my RH9
> system.
> 
> It has occurred to me that a useful yum option would be:
> 
>   yum showvar [distribution,releasever,basearch]
> 
> to produce the respective output:
> 
>   distribution
>   releasever
>   basearch
> 
> The reason that would be useful is it would show how yum will expand the
> variables in a yum.conf (good for admins) and it would allow relocatable
> Makefiles to be built that do things like:
> 
> DISTRO=`yum showvar distribution`
> DISTVER=`yum showvar releasever`
> BASEARCH=`yum showvar basearch`
> REPO_PATH = /home/rgb/public_html/my_yum/$(DISTRO)/$(DISTVER)/$(BASEARCH)
> 
> (good for developers).  For example, one could fairly easily build an
> rpm and drop it into just the right place (and even rerun yum-arch on
> that place) with a single make target.
> 
> However, I won't push my luck with Seth... he hasn't yet said excited
> things about the patch and may even be thinking Bad Thoughts about it
> even without cracking it way up.  ;-)
> 
> If I really want it I can easily write a python or perl script that does
> only this and call it inside my makefiles.  If Seth accepts this one
> measly little patch, I can get on with posting just ONE yum.conf to
> accompany my rgb-ware distribution scheme...:-)
> 

I'm not accepting patches against 2.0.X unless they are bugfix patches.

-sv





More information about the Yum mailing list