[Yum-devel] [PATCH] Don't fail when pre-caching filelists. BZ 769864.
Zdenek Pavlas
zpavlas at redhat.com
Thu Jan 12 15:17:48 UTC 2012
> On the other hand I can't think of a reason to not change makecache to
> just call:
>
> base.repos.populateSack(mdtype='all', cacheonly=1)
>
> ...and then we don't have to worry about it.
Also 'makecache' sets mdpolicy to "group:all", so there seems
to be no need to explicitly load metadata/filelists/otherdata.
And there's base.repos.doSetup(), so I don't know why it touches
every repo.repoXML. The following works in HEAD:
--- a/yumcommands.py
+++ b/yumcommands.py
@@ -962,17 +962,6 @@ class MakeCacheCommand(YumCommand):
repo.mdpolicy = "group:all"
base.doRepoSetup(dosack=0)
base.repos.doSetup()
- for repo in base.repos.listEnabled():
- repo.repoXML
-
- # These convert the downloaded data into usable data,
- # we can't remove them until *LoadRepo() can do:
- # 1. Download a .sqlite.bz2 and convert to .sqlite
- # 2. Download a .xml.gz and convert to .xml.gz.sqlite
- base.repos.populateSack(mdtype='metadata', cacheonly=1)
- base.repos.populateSack(mdtype='filelists', cacheonly=1)
- base.repos.populateSack(mdtype='otherdata', cacheonly=1)
-
except yum.Errors.YumBaseError, e:
return 1, [str(e)]
More information about the Yum-devel
mailing list