Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 230851 - yum does not accept --disablerepo option
Summary: yum does not accept --disablerepo option
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact:
: 237168 (view as bug list)
Depends On:
Blocks: FC7Blocker 230870
TreeView+ depends on / blocked
Reported: 2007-03-03 18:34 UTC by Mamoru TASAKA
Modified: 2014-01-21 22:57 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2007-04-25 22:06:47 UTC

Attachments (Terms of Use)

Description Mamoru TASAKA 2007-03-03 18:34:40 UTC
Description of problem:
With yum-3.1.3-2.fc7 even I try to exclude some repo
by --excluderepo option, yum still try to use the repo

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

How reproducible:

Steps to Reproduce:
1. Create some repo with URL pointing to some wrong URL
2. Try to use yum with --excluderepo=<the_wrong_repo>
Actual results:
[root@localhost i386]# yum check-update --disablerepo=extras-development-debuginfo
Loading "installonlyn" plugin

Cannot find a valid baseurl for repo: extras-development-debuginfo

Expected results:
yum should skip the repo

Additional info:
yum 3.1.2 does not seem to have this issue.

Comment 1 Jeremy Katz 2007-03-05 20:09:34 UTC
Hrmm... this is being caused because we do the repo setup now when we access
YumBase.repos.  Which we do for the first time on the --disablerepo.  

repo setup probably needs to be separated from getting the repos object.  But
how to do that while still not making it so that we don't have to explicitly set
up repos might be a little ugly :-/

Comment 2 Mamoru TASAKA 2007-03-06 03:50:10 UTC
I just noticed that --excluderepo is the typo.
I meant "--disablerepo", sorry...

Comment 3 Mamoru TASAKA 2007-03-08 16:29:51 UTC
yum-3.1.4-1.fc7 does not seem to be okay.

Comment 4 Seth Vidal 2007-04-03 04:44:09 UTC
I've just tested this command and --enablerepo on cvs head and I can't get the
problem to occur. Can anyone else replicate it on what's in cvs right now?

Comment 5 Mamoru TASAKA 2007-04-03 04:51:41 UTC
What do you mean by "cvs version"?

At least, 3.1.5-1 is still not okay.

Comment 6 Mamoru TASAKA 2007-04-05 14:12:27 UTC
3.1.6-1 is still not okay.

Comment 7 Seth Vidal 2007-04-05 14:18:53 UTC
Then I need you to define 'not okay' b/c I can't make it fail.

Comment 8 Mamoru TASAKA 2007-04-05 14:48:17 UTC
100% reproducible as below.

* Well, Currently "extras-development-debuginfo" repository (in
  fedora-extras-development.repo in fedora-release-6.92-1) cannot be
  enabled because'
  returns "# no repository available for repo extras-devel-debug"
* Then intentionally enable this repository with writing "enabled=1"
  on extras-development-debuginfo repo in 
  fedora-extras-development.repo file
* Try # yum --disablerepo=extras-development-debuginfo check-update

Cannot find a valid baseurl for repo: extras-development-debuginfo

Still happens on 3.1.6-1. 3.1.0-2 does not have this problem.

Comment 9 Jeremy Katz 2007-04-17 23:19:57 UTC
Aha, it's related to the mirror list.  The same thing doesn't happen if you have
a non-existent baseurl.

James -- does the patch you sent to yum-devel over the weekend help with this case?

Comment 10 Jeremy Katz 2007-04-19 20:51:48 UTC
*** Bug 237168 has been marked as a duplicate of this bug. ***

Comment 11 James Bowes 2007-04-19 22:55:25 UTC
(In reply to comment #9)
> Aha, it's related to the mirror list.  The same thing doesn't happen if you have
> a non-existent baseurl.
> James -- does the patch you sent to yum-devel over the weekend help with this

Nope :(

I did some hunting, and the root cause is the change to use properties rather
than calling doFooSetup().

specifically, in
elif opt == "--disablerepo"

that referencing of self.base.repos will end up running doRepoSetup() before
disableRepo is called.

Comment 12 Jeremy Katz 2007-04-25 22:06:47 UTC
Okay, got something that looks like it's working and sent it to the upstream
list for comments.  Should hopefully get into 3.1.7

Comment 13 Mamoru TASAKA 2007-04-28 14:36:53 UTC
yum-3.1.7-1 erased this problem.
Thank you!!

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