Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to download SRPMs from redhat from what of their servers. I went through step one of initializing the repository...

# cat /etc/yum.repos.d/rhel-source.repo 
name=Red Hat Enterprise Linux $releasever - $basearch - Source

Then I did a yum update, and everything to make sure my repo database was up to date. When I go to download the source, however...

# yumdownloader --source gcc
Loaded plugins: product-id, refresh-packagekit, rhnplugin
No source RPM found for gcc-4.4.4-13.el6.x86_64
No source RPM found for gcc-4.4.5-6.el6.x86_64
Nothing to download

I went through the same steps on CentOS 5 and it works. (Though, I'm using the CentOS repository, not RHEL's... Still, I'm puzzled. I even FTP'ed their server manually and looked

ftp> ls gcc*
227 Entering Passive Mode (209,132,183,61,19,97).
150 Here comes the directory listing.
-rw-r--r--    4 ftp      ftp      52214716 Aug 17  2010 gcc-4.4.4-13.el6.src.rpm
-rw-r--r--    5 ftp      ftp      52113813 Apr 21 20:28 gcc-4.4.5-6.el6.src.rpm
226 Directory send OK.

Those look like SRPMs to me... what am I doing wrong?


share|improve this question
What does $releasever evaluate to? Also, that repo should be disabled by default; yumdownloader will enable it as appropriate. – Ignacio Vazquez-Abrams Jun 28 '11 at 20:55
@Ignacio Vazquez-Abrams It resolves to "6Server", making the full path – yggdrasil Jun 28 '11 at 21:05
up vote 1 down vote accepted

This seems to be a bug in yum-utils, nothing that you're doing wrong.

I did a little crude "print" debugging between my RHEL 6 server, and My Fedora 14 workstation. Right after line 47 & 48 in /usr/bin/yumdownloader:

(n,v,r,e,a) = rpmUtils.miscutils.splitFilename(pkg.sourcerpm)
src = self.pkgSack.searchNevra(name=n, ver=v, rel=r, arch='src')

I added a couple of debugging statements and found the following:

From my RHEL 6 server (indented areas following "Debug:" being the areas of interest):

# yumdownloader --source gcc
Loaded plugins: presto, rhnplugin
Enabling epel-source repository
    pkg.sourcerpm = gcc-4.4.4-13.el6.src.rpm
    n = gcc
    v = 4.4.4
    r = 13.el6
    src = []
No source RPM found for gcc-4.4.4-13.el6.x86_64
    pkg.sourcerpm = gcc-4.4.5-6.el6.src.rpm
    n = gcc
    v = 4.4.5
    r = 6.el6
    src = []
No source RPM found for gcc-4.4.5-6.el6.x86_64
Nothing to download

From my Fedora 14 workstation:

# yumdownloader --source gcc
Loaded plugins: presto, refresh-packagekit
Enabling updates-source repository
Enabling rpmfusion-nonfree-updates-source repository
Enabling rpmfusion-nonfree-source repository
Enabling rpmfusion-free-updates-source repository
Enabling fedora-source repository
Enabling rpmfusion-free-source repository
    pkg.sourcerpm = gcc-4.5.1-4.fc14.src.rpm
    n = gcc
    v = 4.5.1
    r = 4.fc14
    src = [<YumAvailablePackageSqlite : gcc-4.5.1-4.fc14.src (0xe5e150)>]
gcc-4.5.1-4.fc14.src.rpm                                 |  52 MB     00:38

So we know what src "should" be, based off of Fedora 14. /usr/bin/yumdownloader is identical between RHEL6, and Fedora 14 (md5sums match). However the yum-utils libraries that yumdownloader is leveraging are different between RHEL6 and Fedora 14, and that is likely the culprit.

I'd file a bug with Redhat against the yum-utils package.

share|improve this answer
Thanks for the answer. I tried to go and verify it by opening a ticket with RedHat. Their site let me actually open a ticket, but since I'm only in trial version, they didn't have the time for me... Understandable. Accepted anyway, cause your logs you posted have compelling evidence of what's going on; or at least that I'm not really doing anything wrong, which was the question ;) – yggdrasil Jul 7 '11 at 14:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.