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'
This is fixed in upstream commit b566b30169f1db62527133b5d57d010322218084 Should make it's way into Fedora 9, updates-testing "soon".
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
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
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.
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.
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
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
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
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.