SCIENTIFIC-LINUX-USERS Archives

July 2013

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:
Reply To:
Date:
Thu, 11 Jul 2013 18:35:43 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (51 lines)
On Thu, Jul 11, 2013 at 3:39 PM, Stefan Lasiewski <[log in to unmask]> wrote:
>
> When using third party Yum repositories, I often run into a problem with the
> yum variable $releasever . Scientific Linux uses a version number which is
> different then what is expected on many third party repositories, which
> means that I need to go in and make changes to the appropriate
> /etc/yum.repos.d/*.repo files every time I run into this error.
>
> What is the best way to handle this problem, short of modifying the *.repo
> every single time? Is this a SL bug?
>
> In this example, I am simply trying to get Puppet installed on SL6.4:
>
> root@sl6:/etc/yum.repos.d # /usr/bin/yum -q -y install npm
> http://patches.fedorapeople.org/oldnode/stable/el6.4/x86_64/repodata/repomd.xml:
> [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not
> Found"
> Trying other mirror.
> Error: Cannot retrieve repository metadata (repomd.xml) for repository:
> nodejs-stable. Please verify its path and try again
>
> The reason this error occurs is because the repo expects a $releasever
> variable like '5' or '6' . Visit the repo at
> http://patches.fedorapeople.org/oldnode/stable/ , and see that it expects
> strings like 'el6' & 'el5':
>
> root@sl6:~ # cat /etc/yum.repos.d/nodejs-stable.repo
> [nodejs-stable]
> name=Stable releases of Node.js
> baseurl=http://patches.fedorapeople.org/oldnode/stable/el$releasever/$basearch/
> enabled=1
> gpgcheck=1
> gpgkey=http://patches.fedorapeople.org/oldnode/stable/RPM-GPG-KEY-tchol
> root@sl6:~ #
>
> Compare this against SL, which provides a $releasever like 6.4. Therefore
> the URL will be appended to be
> http://patches.fedorapeople.org/oldnode/stable/el6.4/x86_64 , which doesn't
> exist.
>
> root@sl6:~ # python -c 'import yum, pprint; yb = yum.YumBase();
> pprint.pprint(yb.conf.yumvar, width=1)'
> Loaded plugins: fastestmirror, priorities
> {'arch': 'ia32e',
>  'basearch': 'x86_64',
>  'releasever': '6.4',
>  'uuid': 'a7d2547c-c95c-4577-88e8-eb0b18c89101'}

You can pass "--releasever=" to yum (as well as "--disablerepo=" and
"--enablerepo=")

ATOM RSS1 RSS2