Subject: | |
From: | |
Reply To: | |
Date: | Fri, 4 Mar 2011 22:15:43 -0800 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
On 3/4/2011 17:06, Jon Peatfield wrote:
> On Fri, 4 Mar 2011, Maciej Puzio wrote:
>
>> Files /etc/yum.repos.d/atrpms.repo, atrpms-testing.repo and
>> atrpms-bleeding.repo from package atrpms-repo-6-4.el6.x86_64 contain
>> wrong
>> baseurls:
>> baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/stable
>> baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/testing
>> baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/bleeding
>> Variable $releasever expands to "6.0", while atrpms keeps packages in
>> directories el6-i386 and el6-x86_64 - that is, without ".0". As a result,
> ...
>
> 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.
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.
--
Garrett Holmstrom
|
|
|