Bug 233573

Summary: yumdownloader crashes: 'NoneType' object has no attribute 'repoData'
Product: [Fedora] Fedora Reporter: Robin Green <greenrd>
Component: yumAssignee: Seth Vidal <skvidal>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-04-06 13:11:39 UTC Type: ---
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: 230870    
Bug Blocks:    

Description Robin Green 2007-03-23 10:12:23 UTC
Description of problem:
When I try to pass --enablerepo=development-source to yumdownloader I get the
error shown below.

Version-Release number of selected component (if applicable):
yum-utils-1.1.1-1.fc7

How reproducible:
Always

Steps to Reproduce:
1. sudo yumdownloader --enablerepo=development-source --source make
  
Actual results:
Loading "installonlyn" plugin
Traceback (most recent call last):
  File "/usr/bin/yumdownloader", line 175, in <module>
    util = YumDownloader()
  File "/usr/bin/yumdownloader", line 38, in __init__
    self.main()
  File "/usr/bin/yumdownloader", line 61, in main
    self.doUtilYumSetup()
  File "/usr/share/yum-cli/utils.py", line 77, in doUtilYumSetup
    self._getSacks()
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 380, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.5/site-packages/yum/repos.py", line 200, in populateSack
    sack.populate(repo, mdtype, callback, cacheonly)
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 132, in populate
    if self._check_db_version(repo, mydbtype):
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 189, in
_check_db_version
    if repo.repoXML.repoData.has_key(mdtype):
AttributeError: 'NoneType' object has no attribute 'repoData'


Expected results:
Download completes successfully

Additional info:
yum-3.1.4-1.fc7

Comment 1 Robin Green 2007-03-23 10:18:57 UTC
This is not specific to yumdownloader - it also occurs with yum:

$ sudo yum --enablerepo=development-source install blah
Loading "installonlyn" plugin
Setting up Install Process
Parsing package install arguments
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 94, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 263, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd,
self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 134, in doCommand
    return base.installPkgs(extcmds)
  File "/usr/share/yum-cli/cli.py", line 434, in installPkgs
    self.pkgSack.matchPackageNames(arglist)
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 489, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 380, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.5/site-packages/yum/repos.py", line 200, in populateSack
    sack.populate(repo, mdtype, callback, cacheonly)
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 132, in populate
    if self._check_db_version(repo, mydbtype):
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 189, in
_check_db_version
    if repo.repoXML.repoData.has_key(mdtype):
AttributeError: 'NoneType' object has no attribute 'repoData'

Comment 2 Jiri Slaby 2007-04-06 07:55:18 UTC
This is a month or so old issue. I wonder if somebody cares? See bug #230870. 

[Somebody with permissions should mark this as duplicate of the bug.]

Comment 3 Tim Lauridsen 2007-04-06 13:11:39 UTC
I care :-))

I have just submitted a patch upstream to fix this issue, where repos add with
--enablerepo is not setup correctly.

*** This bug has been marked as a duplicate of 230870 ***