[packagekit] yumbackend metadata_expire in mediarepo
مؤيد السعدي
muayyad.alsadi at ojuba.org
Wed Jul 29 05:25:56 PDT 2009
hello,
PK does not respect metadata_expire=-1 in media.repo which gives this error
https://fedoraproject.org/wiki/Talk:Features/MediaRepo#Bugs_and_Problems
we can see unconditional overriding the right value of repo.metadata_expire
in several places like this
http://cgit.freedesktop.org/packagekit/tree/backends/yum/yumBackend.py#n1419
for repo in self.yumbase.repos.listEnabled():
repo.metadata_expire = 0
and here too
http://cgit.freedesktop.org/packagekit/tree/backends/yum/yumBackend.py#n2481
for repo in self.yumbase.repos.listEnabled():
repo.metadata_expire = 60 * 60 * 24 # 24 hours
and here too
http://cgit.freedesktop.org/packagekit/tree/backends/yum/yumBackend.py#n2487
I guess there should be some condition
for example in the last two cases it should become
for repo in self.yumbase.repos.listEnabled():
if repo.metadata_expire!=-1:
repo.metadata_expire = 60 * 60 * 24 # 24 hours
or something like this
for repo in self.yumbase.repos.listEnabled():
if repo.mediaid:
repo.metadata_expire = 60 * 60 * 24 # 24 hours
or even
if repo.baseurl or repo.mirrorlist or repo.metalink:
repo.metadata_expire = 60 * 60 * 24 # 24 hours
so what do you think
More information about the PackageKit
mailing list