Bug 889203 - dnf --disablerepo options causes traceback
Summary: dnf --disablerepo options causes traceback
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ales Kozumplik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 871892
TreeView+ depends on / blocked
 
Reported: 2012-12-20 13:50 UTC by Jan Vcelak
Modified: 2014-09-30 23:40 UTC (History)
3 users (show)

Fixed In Version: dnf-0.2.20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-03 14:56:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


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