Bug 889203 - dnf --disablerepo options causes traceback
dnf --disablerepo options causes traceback
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ales Kozumplik
Fedora Extras Quality Assurance
Depends On:
Blocks: 871892
  Show dependency treegraph
Reported: 2012-12-20 08:50 EST by Jan Vcelak
Modified: 2014-09-30 19:40 EDT (History)
3 users (show)

See Also:
Fixed In Version: dnf-0.2.20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-04-03 10:56:27 EDT
Type: Bug
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 Jan Vcelak 2012-12-20 08:50:25 EST
Description of problem:

--disablerepo options causes DNF to traceback

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

How reproducible:

Steps to Reproduce:
1. dnf update --disablerepo test
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
  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
  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
  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
  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 03:23:08 EST
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 04:27:39 EST
"--disablerepo" was fixed by 29d3169.

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