Bug 1330003 - yum-config-manager --add-repo fails with IndexError when no .repo files present
Summary: yum-config-manager --add-repo fails with IndexError when no .repo files present
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum-utils
Version: 6.8
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Valentina Mukhamedzhanova
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-25 09:18 UTC by Eva Mrakova
Modified: 2018-03-08 04:34 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1184912
Environment:
Last Closed: 2017-12-06 11:07:45 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Eva Mrakova 2016-04-25 09:18:06 UTC
Also happens for yum-utils-1.1.30-37.el6

+++ This bug was initially created as a clone of Bug #1184912 +++

Description of problem:

When /etc/yum.repos.d contains no .repo files, yum-config-manager fails to add a new repository via the --add-repo option, producing a traceback.

Version-Release number of selected component (if applicable):
yum-utils-1.1.31-29.el7.noarch

Steps to Reproduce:

# for repo in /etc/yum.repos.d/*; do mv $repo $repo.disabled; done
# yum-config-manager --add-repo ceph.repo 
Loaded plugins: priorities, product-id
adding repo from: ceph.repo
Traceback (most recent call last):
  File "/usr/bin/yum-config-manager", line 209, in <module>
    grabber = yb.repos.listEnabled()[0].grabfunc            
IndexError: list index out of range

...
--- Additional comment from Zdenek Juran on 2016-01-15 10:21:20 CET ---

BTW you don't need to move repository definitions out it is enough to make them disabled by: yum-config-manager --disable <list-of-repos>

Comment 3 Jan Kurik 2017-12-06 11:07:45 UTC
Red Hat Enterprise Linux 6 is in the Production 3 Phase. During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.

The official life cycle policy can be reviewed here:

http://redhat.com/rhel/lifecycle

This issue does not meet the inclusion criteria for the Production 3 Phase and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification. Note that a strong business justification will be required for re-evaluation. Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL:

https://access.redhat.com/


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