Bug 889203

Summary: dnf --disablerepo options causes traceback
Product: [Fedora] Fedora Reporter: Jan Vcelak <jvcelak>
Component: dnfAssignee: Ales Kozumplik <akozumpl>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: akozumpl, jzeleny, tsmetana
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-0.2.20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-03 14:56:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 871892    

Description Jan Vcelak 2012-12-20 13:50:25 UTC
Description of problem:

--disablerepo options causes DNF to traceback


Version-Release number of selected component (if applicable):
dnf-0.2.17-1.git6a055e6.fc18.noarch

How reproducible:
always


Steps to Reproduce:
1. dnf update --disablerepo test
2.
3.
  
Actual results:
Traceback (most recent call last):
  File "/bin/dnf", line 35, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 314, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 99, in main
    cli.configure(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1393, in configure
    (opts, self.base.cmds) = self.optparser.setupYumConfig(args=args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1614, in setupYumConfig
    self.base.repos.disableRepo(repoexp)
  File "/usr/lib/python2.7/site-packages/dnf/yum/__init__.py", line 749, in <lambda>
    repos = property(fget=lambda self: self._getRepos(),
  File "/usr/lib/python2.7/site-packages/dnf/yum/__init__.py", line 617, in _getRepos
    self.getReposFromConfig()
  File "/usr/lib/python2.7/site-packages/dnf/yum/__init__.py", line 493, in getReposFromConfig
    self.getReposFromConfigFile(repofn, repo_age=thisrepo_age)
  File "/usr/lib/python2.7/site-packages/dnf/yum/__init__.py", line 440, in getReposFromConfigFile
    thisrepo = self.readRepoConfig(parser, section)
  File "/usr/lib/python2.7/site-packages/dnf/yum/__init__.py", line 517, in readRepoConfig
    repo.basecachedir = self.cache_c.cachedir
  File "/usr/lib/python2.7/site-packages/dnf/conf.py", line 74, in cachedir
    self._make_ready()
  File "/usr/lib/python2.7/site-packages/dnf/conf.py", line 58, in _make_ready
    self._cachedir = self._retdir(self.prefix)
  File "/usr/lib/python2.7/site-packages/dnf/conf.py", line 70, in _retdir
    return os.path.join(dir, self.suffix)
  File "/usr/lib64/python2.7/posixpath.py", line 66, in join
    if b.startswith('/'):
AttributeError: 'NoneType' object has no attribute 'startswith'

Expected results:


Additional info:

Comment 1 Ales Kozumplik 2012-12-21 08:23:08 UTC
Hi Jan,

thanks for reporting this. Disablerepo is not supported yet but coming.

I'll see if it is worth fixing the traceback or just adding the support in one step.

Comment 2 Ales Kozumplik 2013-01-16 09:27:39 UTC
"--disablerepo" was fixed by 29d3169.