Blob Blame History Raw
commit 4dfcd53103ac572e27e67e85088b6dee48b2e171
Author: Richard Hughes <richard@hughsie.com>
Date:   Thu Apr 2 11:20:55 2009 +0100

    bugfix: yum cannot handle FakeRepository.repo, unlike a normal Repository, so just handle the local case specially. Fixes rh#486720

diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index f13bd9d..aade7bd 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -2641,8 +2641,13 @@ class PackageKitCallback(RPMBaseCallback):
             # we don't know the summary text
             self.base.package(package_id, status, "")
         else:
+            # local file shouldn't put the path in the package_id
+            repo_id = _to_unicode(self.curpkg.repo.id)
+            if repo_id.find("/") != -1:
+                repo_id = 'local'
+
             pkgver = _get_package_ver(self.curpkg)
-            package_id = self.base.get_package_id(self.curpkg.name, pkgver, self.curpkg.arch, self.curpkg.repo)
+            package_id = self.base.get_package_id(self.curpkg.name, pkgver, self.curpkg.arch, repo_id)
             self.base.package(package_id, status, self.curpkg.summary)
 
     def event(self, package, action, te_current, te_total, ts_current, ts_total):