SCIENTIFIC-LINUX-DEVEL Archives

February 2008

SCIENTIFIC-LINUX-DEVEL@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:
Jon Peatfield <[log in to unmask]>
Reply To:
Jon Peatfield <[log in to unmask]>
Date:
Fri, 8 Feb 2008 19:15:21 +0000
Content-Type:
TEXT/PLAIN
Parts/Attachments:
TEXT/PLAIN (68 lines)
On Wed, 21 Nov 2007, Troy Dawson wrote:
<snip>
>>  Finally a question I'm not sure if I've asked before.  Is there a reason
>>  how/why /etc/yum.conf contains the line:
>>
>>     distroverpkg=redhat-release
>>
>>  and while there isn't such a package $releasever in a repo config gets set
>>  to the version of sl-release (which does *provide* redhat-release).
>>
>>  Sadly $releasever doesn't match the directory names in the SL trees so one
>>  can't simply have a repo with a line like:
>>
>>  baseurl=ftp://ftp.scientificlinux.org/linux/scientific/$releasever/$basearch/SL
>>
>>  btw is there a _good_ way to add something to tell yum that I have a local
>>  mirror of a repo without having to edit the repos.d/ files each time?
>>
>>    -- Jon
>
> Hmmm ... something that needs some thinking about ...
> I haven't tried any of this, I'm just thinking out loud ...
>
> What if in /etc/yum.conf we had the variable
> repourl=http://ftp.scientificlinux.org/linux/scientific/
>
> and then in the yum.repo's you could have
>
> baseurl=$repourl/51/$basearch/SL
>
> Do you think that would confuse people?
>
> What about having a comment at the top that says something like
>
> # To change the repourl you need to edit /etc/yum.conf
>
> I'm still thinking about what to do about the $releasever because that 
> doesn't match where we actually have our distributions.

Just for info in case others were not aware of this.  I just edited the 
files we add into /etc/yum.repos.d/ to change:

   baseurl=file:///opt/instsl/upstream/50/$basearch/SL

to

   baseurl=file:///opt/instsl/upstream/$releasever/$basearch/SL

Did a yum clean all, and yum makecache and it complained about 5.1 not 
existing (as expected), then I added the symlinks for 5.1 and 5.0 to 51 
and 50 and ran yum makcecache and it complained - until I ran the yum 
clean all again.

The error message was:

file:///opt/instsl/upstream/5.1/i386/SL/repodata/repomd.xml: [Errno 5] 
OSError: [Errno 2] No such file or directory: 
'/opt/instsl/upstream/5.1/i386/SL/repodata/repomd.xml'
Trying other mirror.
Error: Cannot open/read repomd.xml file for repository: sl-mirror-base

as if the files didn't exist, but at that point they clearly did.

Anyway using $releasever seems to work fine with the addition of a couple 
of symlinks in the repo.

  -- Jon

ATOM RSS1 RSS2