[packagekit] Refreshing the cache wrongly.

Robin Norwood rnorwood at redhat.com
Mon Feb 18 13:29:08 PST 2008


Hi,

Getting this error when trying to refresh the yum cache:

Unable to send message on dbus
org.freedesktop.DBus.Python.yum.Errors.RepoError: Traceback (most
recent call last): File
"/usr/lib/python2.5/site-packages/dbus/service.py", line 696, in
_message_cb retval = candidate_method(self, *args, **keywords) File
"yumDBUSBackend.py", line 434, in SearchGroup self._refresh_yum_cache()
  File "yumDBUSBackend.py", line 1478, in _refresh_yum_cache
    self.yumbase.repos.populateSack(mdtype='filelists', cacheonly=0)
  File "/usr/lib/python2.5/site-packages/yum/repos.py", line 242, in
populateSack sack.populate(repo, mdtype, callback, cacheonly)
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 156, in
populate db_fn = repo._retrieveMD(mydbtype, retrieve_can_fail=True)
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1134, in
_retrieveMD self)
RepoError: Caching enabled but no local cache
of //var/cache/yum/development/filelists.sqlite.bz2 from development



So obviously I'm doing it wrongly.  Any yum guys out there to help?

        old_cache_setting = self.yumbase.conf.cache
        self.yumbase.conf.cache = 0
        self.yumbase.repos.populateSack(mdtype='metadata', cacheonly=1)
	self.yumbase.repos.populateSack(mdtype='filelists', cacheonly=1)
        self.yumbase.repos.populateSack(mdtype='otherdata', cacheonly=1)
	self.yumbase.conf.cache = old_cache_setting


-RN

-- 
Robin Norwood
Red Hat, Inc.

"The Sage does nothing, yet nothing remains undone."
-Lao Tzu, Te Tao Ching



More information about the PackageKit mailing list