Bug 1264027 - plugin doesn't accept parameter --enablerepo for spacewalk repos
Summary: plugin doesn't accept parameter --enablerepo for spacewalk repos
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-17 10:53 UTC by Pavel Studeník
Modified: 2015-11-12 14:19 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-11-12 14:10:53 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Pavel Studeník 2015-09-17 10:53:07 UTC
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 13:56:05 UTC
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 14:10:53 UTC
> 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.