commit 65083dff66f90e94aee7f34e7bfe003b0bbe2909 Author: Richard Hughes Date: Fri Sep 12 11:07:56 2008 +0100 yum: add a workaround when getObsoletesTuples fails, fixes fd#17528 diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py index 1cc208e..de91359 100755 --- a/backends/yum/yumBackend.py +++ b/backends/yum/yumBackend.py @@ -1371,11 +1371,14 @@ class PackageKitYumBackend(PackageKitBaseBackend): self.repo_detail(repo.id,repo.name,'false') def _get_obsoleted(self,name): - obsoletes = self.yumbase.up.getObsoletesTuples(newest=1) - for (obsoleting,installed) in obsoletes: - if obsoleting[0] == name: - pkg = self.yumbase.rpmdb.searchPkgTuple(installed)[0] - return self._pkg_to_id(pkg) + try: + obsoletes = self.yumbase.up.getObsoletesTuples(newest=1) + for (obsoleting,installed) in obsoletes: + if obsoleting[0] == name: + pkg = self.yumbase.rpmdb.searchPkgTuple(installed)[0] + return self._pkg_to_id(pkg) + except: + pass # no obsolete data - fd#17528 return "" def _get_updated(self,pkg):