SCIENTIFIC-LINUX-USERS Archives

March 2011

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Stephan Wiesand <[log in to unmask]>
Reply To:
Stephan Wiesand <[log in to unmask]>
Date:
Sat, 5 Mar 2011 07:33:26 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (34 lines)
On Mar 5, 2011, at 07:15 , Garrett Holmstrom wrote:

> On 3/4/2011 17:06, Jon Peatfield wrote:
>> 
>> 
>> I've never understood why yum doesn't provide a $majorreleasever
>> variable as well as $releasever - for those repos where you want to have
>> a single tree for each major release (but not for the point releases)
>> and don't expect people to edit the .repo files.
>> 
>> I *think* it would be an easy change to yum's config.py (where
>> yumvars['releasever'] gets set). Perhaps it would be better to have a
>> syntax in the .conf files to allow variables/values to be defined which
>> will be expanded in .repo files (you can already use YUM0-YUM9
>> environment variables but those are horrid names).
> 
> Yum 3.2.28 already has this type of feature.  If you drop a file in /etc/yum/vars/ you can access the first line of its contents like a shell variable.  For example, if you run ``echo 6 > /etc/yum/vars/majorreleasever'' then you can do exactly what you described.  So rather than implementing it yourself it might be worth asking upstream to backport the code that already exists.

No need to ask - SL6 already has this feature:

* Fri Apr 16 2010 James Antill <[log in to unmask]> - 3.2.27-4
- A few minor bugfixes from upstream
- Add dynamic FS based yumvars

Variable names must be lower case.

> Yum has no concept of a major or minor release; it just grabs the version of your sl-release package.  AFAIK, SL is the only distro among its siblings that changes this version with every point release, so it is the only one on which the usual $releasever scheme breaks.

-- 
Stephan Wiesand
DESY -DV-
Platanenenallee 6
15738 Zeuthen, Germany

ATOM RSS1 RSS2