Bug 1082050

Summary: RFE: adjust yum-downloader logic for source repos in CDN
Product: Red Hat Enterprise Linux 7 Reporter: Karel Srot <ksrot>
Component: yum-utilsAssignee: James Antill <james.antill>
Status: CLOSED ERRATA QA Contact: Karel Srot <ksrot>
Severity: high Docs Contact:
Priority: medium    
Version: 7.1CC: cpelland, dgregor, hartsjc, jsvarova, packaging-team-maint, vmukhame
Target Milestone: rcKeywords: FutureFeature, Regression, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: yum-utils-1.1.31-25.el7 Doc Type: Enhancement
Doc Text:
Previously, yumdownloader considered only certain naming scheme of source repositories, which Certificate-based Red Hat Network content delivery network (CDN) did not follow. As a consequence, the yumdownloader and yum-builddep utilities did not work with the source repositories created in CDN. With this update, support for the new naming scheme of source repositories has been added, and yumdownloader and yum-builddep now work with source CDN repositories as intended.
Story Points: ---
Clone Of: 710469
: 1126781 (view as bug list) Environment:
Last Closed: 2015-03-05 09:03:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1110703, 1113520, 1126781    

Description Karel Srot 2014-03-28 14:43:38 UTC
feature doesn't seem to be implemented on RHEL-7, tested with 
yum-utils-1.1.31-24.el7

+++ This bug was initially created as a clone of Bug #710469 +++

It came to my attention that the logic for --source in yumdownloader is not going to work with the repos that we've created in the CDN.  yumdownloader only looks at repos with a label of <base repo>-source.  For example, if you have a repo of binary rpms named rhel-6-workstation-rpms, it expects the SRPMs to be in rhel-6-workstation-rpms-source.  However, in the CDN the repo is named rhel-6-workstation-source-rpms.

One low-tech solution would be to have yum downloader check for this pattern as well.  Something like:

srcrepo = repo.id.replace('-rpms', '-source-rpms')
if srcrepo in src_repos:
    src_repos[srcrepo] = True

Alternatively, we could use yum repo tagging to explicitly list the label of the source repo in the repodata of the binary repo.

Comment 1 James Antill 2014-06-12 15:13:29 UTC
 This is fixed in el6, so I guess it's a regression. We forgot to turn the rhn_source_repos default to on, so it's a one line change.

Comment 12 errata-xmlrpc 2015-03-05 09:03:39 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0401.html