Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 230851 - yum does not accept --disablerepo option
yum does not accept --disablerepo option
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
: 237168 (view as bug list)
Depends On:
Blocks: FC7Blocker 230870
  Show dependency treegraph
Reported: 2007-03-03 13:34 EST by Mamoru TASAKA
Modified: 2014-01-21 17:57 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-04-25 18:06:47 EDT
Type: ---
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 Mamoru TASAKA 2007-03-03 13:34:40 EST
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 15:09:34 EST
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-05 22:50:10 EST
I just noticed that --excluderepo is the typo.
I meant "--disablerepo", sorry...
Comment 3 Mamoru TASAKA 2007-03-08 11:29:51 EST
yum-3.1.4-1.fc7 does not seem to be okay.
Comment 4 Seth Vidal 2007-04-03 00:44:09 EDT
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 00:51:41 EDT
What do you mean by "cvs version"?

At least, 3.1.5-1 is still not okay.
Comment 6 Mamoru TASAKA 2007-04-05 10:12:27 EDT
3.1.6-1 is still not okay.
Comment 7 Seth Vidal 2007-04-05 10:18:53 EDT
Then I need you to define 'not okay' b/c I can't make it fail.
Comment 8 Mamoru TASAKA 2007-04-05 10:48:17 EDT
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 19:19:57 EDT
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 16:51:48 EDT
*** Bug 237168 has been marked as a duplicate of this bug. ***
Comment 11 James Bowes 2007-04-19 18:55:25 EDT
(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 cli.py:
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 18:06:47 EDT
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 10:36:53 EDT
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.