Bug 713108 - reposync -l -r <repoid> do not work with RHN channels
Summary: reposync -l -r <repoid> do not work with RHN channels
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum-utils
Version: 6.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: James Antill
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
: 733165 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-14 10:20 UTC by Kirby Zhou
Modified: 2018-11-14 10:54 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 17:35:29 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1703 normal SHIPPED_LIVE yum-utils bug fix and enhancement update 2011-12-06 01:02:31 UTC

Description Kirby Zhou 2011-06-14 10:20:33 UTC
Description of problem:

reposync -l -r <repoid> do not work with RHN channels.

if the repoid is disabled in the rhnplugin.conf, then the '-r' option can not turn it enabled. if the repoid is enabled, it is always enabled when run reposync with '-r' option.

Version-Release number of selected component (if applicable):

yum-utils-1.1.30-6.el6.noarch
yum-3.2.29-17.el6.noarch
yum-rhn-plugin-0.9.1-26.el6_1.1.noarch


How reproducible:

100%

Steps to Reproduce:
1. add rhel-x86_64-server-6 and rhel-x86_64-server-fastrack-6 channle by rhn-channel command.

2. modify /etc/yum/pluginconf.d/rhnplugin.conf like this:
[main]
enabled = 1
gpgcheck = 1

[rhel-x86_64-server-6]
enabled = 0
[rhel-x86_64-server-fastrack-6]
enabled = 0

3. run reposync

reposync -g -n -l -m -r rhel-x86_64-server-fastrack-6
  
Actual results:

Nothing downloaded.

Expected results:

The channel rhel-x86_64-server-fastrack-6 should be downloaded.

Additional info:

The rhnplugin will be called with doRepoSetup, and it clears then enabled/disabled state of repo. Maybe we should call doRepoSetup before adjust the state of repo.

Patch like this:

--- /usr/bin/reposync   2011-03-23 02:16:06.000000000 +0800
+++ ./reposync  2011-06-14 18:10:16.224086724 +0800
@@ -162,6 +162,14 @@
     elif opts.cachedir:
         my.repos.setCacheDir(opts.cachedir)
 
+    # Use progress bar display when downloading repo metadata
+    # and package files
+    if not opts.quiet:
+        my.repos.setProgressBar(TextMeter(fo=sys.stdout))
+
+    my.doRpmDBSetup()
+    my.doRepoSetup()
+
     if len(opts.repoid) > 0:
         myrepos = []
         
@@ -182,13 +190,6 @@
         print >> sys.stderr, "Error: Can't use --norepopath with multiple repositories"
         sys.exit(1)
 
-    # Use progress bar display when downloading repo metadata
-    # and package files
-    if not opts.quiet:
-        my.repos.setProgressBar(TextMeter(fo=sys.stdout))
-
-    my.doRpmDBSetup()
-    my.doRepoSetup()
     try:
         arches = rpmUtils.arch.getArchList(opts.arch)
         if opts.source:

Comment 3 James Antill 2011-08-25 15:04:53 UTC
*** Bug 733165 has been marked as a duplicate of this bug. ***

Comment 7 errata-xmlrpc 2011-12-06 17:35:29 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.

http://rhn.redhat.com/errata/RHBA-2011-1703.html


Note You need to log in before you can comment on or make changes to this bug.