Bug 1264027 - plugin doesn't accept parameter --enablerepo for spacewalk repos
plugin doesn't accept parameter --enablerepo for spacewalk repos
Status: CLOSED CANTFIX
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
22
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Michael Mráka
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2015-11-12 09:10:53 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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
fedora-22-x86_64
spacewalk-client-fedora-22

# 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
beaker-Fedora
beaker-Fedora-Everything
beaker-Server-debuginfo
...
fedora-22-x86_64
spacewalk-client-fedora-22


Version-Release number of selected component (if applicable):
dnf-plugin-spacewalk-2.4.15-1.fc22.noarch

How reproducible:
always

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.
rhel-x86_64-server-6
...
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.