Bug 459654 - yum shell raises AttributeError
yum shell raises AttributeError
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-20 17:09 EDT by Andrew McNabb
Modified: 2014-01-21 18:06 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-10-27 11:37:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andrew McNabb 2008-08-20 17:09:17 EDT
Running yum shell raises an AttributeError.  Here's a minimal script to reproduce:

"""repo enable rawhide
repo disable rawhide
"""

Here is the traceback:

[root@mcbain ~]# yum shell test.yum
Loaded plugins: refresh-packagekit
Setting up Yum Shell
Reading repository metadata in from local files
Setting up Install Process
Parsing package install arguments
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 243, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 118, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 338, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 592, in doCommand
    return base.doShell()
  File "/usr/share/yum-cli/cli.py", line 283, in doShell
    yumshell.script()
  File "/usr/share/yum-cli/shell.py", line 78, in script
    self.onecmd(line)
  File "/usr/lib64/python2.5/cmd.py", line 219, in onecmd
    return func(arg)
  File "/usr/share/yum-cli/shell.py", line 308, in do_repo
    self.base.pkgSack.buildIndexes()
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 578, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 421, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.5/site-packages/yum/repos.py", line 245, in populateSack
    sack.populate(repo, mdtype, callback, cacheonly)
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 149, in populate
    if self._check_db_version(repo, mydbtype):
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 203, in _check_db_version
    return repo._check_db_version(mdtype)
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 933, in _check_db_version
    repoXML = self.repoXML
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1091, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1083, in _getRepoXML
    self._loadRepoXML(text=self)
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1073, in _loadRepoXML
    return self._groupLoadRepoXML(text, ["primary"])
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1057, in _groupLoadRepoXML
    if self._commonLoadRepoXML(text):
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 902, in _commonLoadRepoXML
    if self._cachingRepoXML(local):
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 762, in _cachingRepoXML
    if self.cache or self.withinCacheAge(self.metadata_cookie,
AttributeError: 'YumRepository' object has no attribute 'metadata_cookie'
[root@mcbain ~]# vim test.yum 
[root@mcbain ~]# yum shell test.yum
Loaded plugins: refresh-packagekit
Setting up Yum Shell
Reading repository metadata in from local files
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 243, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 118, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 338, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 592, in doCommand
    return base.doShell()
  File "/usr/share/yum-cli/cli.py", line 283, in doShell
    yumshell.script()
  File "/usr/share/yum-cli/shell.py", line 78, in script
    self.onecmd(line)
  File "/usr/lib64/python2.5/cmd.py", line 219, in onecmd
    return func(arg)
  File "/usr/share/yum-cli/shell.py", line 308, in do_repo
    self.base.pkgSack.buildIndexes()
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 578, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 421, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.5/site-packages/yum/repos.py", line 245, in populateSack
    sack.populate(repo, mdtype, callback, cacheonly)
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 149, in populate
    if self._check_db_version(repo, mydbtype):
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 203, in _check_db_version
    return repo._check_db_version(mdtype)
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 933, in _check_db_version
    repoXML = self.repoXML
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1091, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1083, in _getRepoXML
    self._loadRepoXML(text=self)
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1073, in _loadRepoXML
    return self._groupLoadRepoXML(text, ["primary"])
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1057, in _groupLoadRepoXML
    if self._commonLoadRepoXML(text):
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 902, in _commonLoadRepoXML
    if self._cachingRepoXML(local):
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 762, in _cachingRepoXML
    if self.cache or self.withinCacheAge(self.metadata_cookie,
AttributeError: 'YumRepository' object has no attribute 'metadata_cookie'
Comment 1 James Antill 2008-08-21 10:33:39 EDT
 This is fixed in upstream commit b566b30169f1db62527133b5d57d010322218084

 Should make it's way into Fedora 9, updates-testing "soon".
Comment 2 Fedora Update System 2008-08-27 14:02:13 EDT
yum-3.2.19-1.fc8 has been submitted as an update for Fedora 8.
http://admin.fedoraproject.org/updates/yum-3.2.19-1.fc8
Comment 3 Fedora Update System 2008-08-27 14:03:39 EDT
yum-3.2.19-1.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/yum-3.2.19-1.fc9
Comment 4 Fedora Update System 2008-09-10 02:58:24 EDT
yum-3.2.19-3.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 5 Fedora Update System 2008-09-10 02:59:14 EDT
yum-3.2.19-3.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 6 Jan Hutař 2008-09-10 07:15:05 EDT
Tested with yum-3.2.19-1.fc9.noarch and seems OK:

# yum shell
Loaded plugins: allowdowngrade, changelog, downloadonly, merge-conf, presto,
              : protectbase, refresh-packagekit, refresh-updatesd, tmprepo,
              : upgrade-helper, verify
Setting up Yum Shell
> repo
...
updates-newkey       Fedora 9 - x86_64 - Updates Newkey       enabled :   4,506
updates-presto       Fedora 9 - x86_64 - Updates Presto       enabled :   5,487
> repo enable rawhide
...
rawhide                                                  | 2.4 kB     00:00     
primary.sqlite.bz2                                       | 8.6 MB     00:03     
...
> repo disable rawhide
> Leaving Shell
Comment 7 Fedora Update System 2008-12-01 10:38:23 EST
yum-3.2.20-4.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/yum-3.2.20-4.fc9
Comment 8 Fedora Update System 2008-12-08 12:08:16 EST
yum-3.2.20-5.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/yum-3.2.20-5.fc9
Comment 9 Fedora Update System 2008-12-17 19:31:46 EST
yum-3.2.20-5.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

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