[packagekit] packagekit: Branch 'master' - 2 commits

Richard Hughes hughsient at kemper.freedesktop.org
Wed Sep 26 23:26:59 PDT 2007


 backends/yum/helpers/yumBackend.py |    3 ++-
 python/packagekit/frontend.py      |    9 ++++++---
 python/pk-frontend-test.py         |    5 +++++
 3 files changed, 13 insertions(+), 4 deletions(-)

New commits:
diff-tree ce07ba0e5597428e155b82ed3ff2e60f6d22f211 (from 45de5164a3dc3bb4431a1654884638773825701a)
Author: Robin Norwood <rnorwood at redhat.com>
Date:   Wed Sep 26 22:30:22 2007 -0400

    Add description helper, and include release in output of yum backend's get_description()

diff --git a/backends/yum/helpers/yumBackend.py b/backends/yum/helpers/yumBackend.py
index 8e8fcc6..eb8bc89 100644
--- a/backends/yum/helpers/yumBackend.py
+++ b/backends/yum/helpers/yumBackend.py
@@ -380,7 +380,8 @@ class PackageKitYumBackend(PackageKitBas
         self._setup_yum()
         pkg,inst = self._findPackage(package)
         if pkg:
-            id = self.get_package_id(pkg.name, pkg.version,pkg.arch, pkg.repo)
+            pkgver = self._get_package_ver(pkg)
+            id = self.get_package_id(pkg.name, pkgver, pkg.arch, pkg.repo)
             desc = pkg.description
             desc = desc.replace('\n\n',';')
             desc = desc.replace('\n',' ')            
diff --git a/python/pk-frontend-test.py b/python/pk-frontend-test.py
index 6004686..9c50496 100755
--- a/python/pk-frontend-test.py
+++ b/python/pk-frontend-test.py
@@ -29,6 +29,11 @@ class pkt(PackageKit):
 	def Package(self,jid,value,name,summary):
 		print "Package: %s - %s"%(name,summary)
 
+	def Description(self,jid,package_id,license,group,detail,url):
+		print "Package: %s" % package_id
+		print "  %s" % url
+		print "  %s" % detail
+
 try:
 	p = pkt()
 except PackageKitNotStarted:
diff-tree 45de5164a3dc3bb4431a1654884638773825701a (from 6bb3bde62e79fd76ee0534e9e50c6dc3409e9028)
Author: Tom Parker <palfrey at tevp.net>
Date:   Wed Sep 26 14:42:47 2007 +0200

    Add new tid stuff to python interface

diff --git a/python/packagekit/frontend.py b/python/packagekit/frontend.py
index 53df0f7..ceca90b 100644
--- a/python/packagekit/frontend.py
+++ b/python/packagekit/frontend.py
@@ -82,6 +82,9 @@ class PackageKit:
 				return jid
 		return wrapper
 
+	def tid(self):
+		return self.pk_iface.GetTid()
+
 	def __init__(self):
 		DBusGMainLoop(set_as_default=True)
 		bus = dbus.SystemBus()
@@ -206,17 +209,17 @@ class PackageKit:
 	@dbusException
 	@job_id
 	def SearchName(self,pattern,filter="none"):
-		return self.pk_iface.SearchName(filter,pattern)
+		return self.pk_iface.SearchName(self.tid(),filter,pattern)
 
 	@dbusException
 	@job_id
 	def GetDescription(self,package_id):
-		return self.pk_iface.GetDescription(package_id)
+		return self.pk_iface.GetDescription(self.tid(),package_id)
 
 	@dbusException
 	@job_id
 	def RefreshCache(self,force=False):
-		return self.pk_iface.RefreshCache(force)
+		return self.pk_iface.RefreshCache(self.tid(),force)
 
 # hack to avoid exporting them
 del dbusException



More information about the PackageKit mailing list