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 <[email protected]> - 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
