Bug 1264027 - plugin doesn't accept parameter --enablerepo for spacewalk repos
plugin doesn't accept parameter --enablerepo for spacewalk repos
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Michael Mráka
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2015-09-17 06:53 EDT by Pavel Studeník
Modified: 2015-11-12 09:19 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-11-12 09:10:53 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Pavel Studeník 2015-09-17 06:53:07 EDT
Description of problem:
I try enable only one spacewalk repository, but parameter "--enablerepo" doesn't work correct 

# dnf repolist --disablerepo=* --enablerepo=spacewalk-client-fedora-22
Error: Unknown repo: 'spacewalk-client-fedora-22'

# dnf repolist --disablerepo=* --enablerepo=spacewalk-client-*
Error: Unknown repo: 'spacewalk-client-*'

# rhn-channel --list

# dnf repolist
This system is receiving updates from Spacewalk server.
Last metadata expiration check performed 2:15:23 ago on Thu Sep 17 08:28:45 2015.
repo id

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

How reproducible:

Steps to Reproduce:
1. register system to spacewalk with some channels
2. run following command

# for it in $(rhn-channel --list); do dnf repolist --disablerepo=* --enablerepo=$it; done
Error: Unknown repo: 'fedora-22-x86_64'
Error: Unknown repo: 'spacewalk-client-fedora-22'

Expected results:

# for it in $(rhn-channel --list); do yum repolist --disablerepo=* --enablerepo=$it; done
Zavedeny zásuvné moduly: product-id, rhnplugin, security, subscription-manager
This system is receiving updates from RHN Classic or RHN Satellite.
Comment 1 Pavel Studeník 2015-10-22 09:56:05 EDT
I looked at the code and dnf finished with failed before spacewalk plugin is loaded. It isn't good behaviour.

Workaround is possible

# dnf repolist --disablerepo=* --enablerepo=spacewalk-client-nightly*

I suppose that this bug is problem of dnf application.
Comment 2 Michael Mráka 2015-11-12 09:10:53 EST
> I suppose that this bug is problem of dnf application.

Well, yes exactly. This is actually a problem in dnf design. The arguments are parsed before the plugin can even run its __init__() so repos dynamicaly created in plugin aren't taken into account.

Unfortunately this can't be fixed without major redesign/rewrite.

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