[PackageKit-commit] packagekit: Branch 'master' - 5 commits
Richard Hughes
hughsient at kemper.freedesktop.org
Wed Sep 24 09:53:33 PDT 2008
backends/smart/helpers/smartBackend.py | 34 +++++++++++++++++----------------
backends/yum/yumBackend.py | 2 -
po/POTFILES.in | 1
python/wrapper-test.py | 19 +++++++++---------
4 files changed, 29 insertions(+), 27 deletions(-)
New commits:
commit f9bd69826a7ccbea00b4d61560adb313105a50f3
Merge: 4758583... b4aac27...
Author: Richard Hughes <richard at hughsie.com>
Date: Wed Sep 24 14:17:40 2008 +0100
Merge branch 'master' of git+ssh://hughsie@git.packagekit.org/srv/git/PackageKit
commit 4758583b6d6204d11d19afbcb74adef9db0a9a89
Author: Richard Hughes <richard at hughsie.com>
Date: Wed Sep 24 14:06:36 2008 +0100
trivial: fix make check
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 908a81d..9d00eb7 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -4,7 +4,6 @@
client/pk-console.c
client/pk-generate-pack.c
client/pk-generate-pack-main.c
-client/pk-import-desktop.c
client/pk-import-specspo.c
client/pk-monitor.c
client/pk-tools-common.c
commit b4aac278725fe08332b4efe4d2a4f17690ece758
Author: Tim Lauridsen <timlau at fedoraproject.org>
Date: Wed Sep 24 13:48:23 2008 +0200
yum: remove some debug printing
diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index 1f1f873..6fd0262 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -105,7 +105,6 @@ class PackageKitYumBackend(PackageKitBaseBackend,PackagekitPackage):
PackageKitBaseBackend.__init__(self,args)
self.yumbase = PackageKitYumBase(self)
self._lang = os.environ['LANG']
- print self._lang
self.comps = yumComps(self.yumbase)
if not self.comps.connect():
self.refresh_cache()
commit 9caaf3c1306219c00fc51890048370076690a011
Author: Tim Lauridsen <timlau at fedoraproject.org>
Date: Wed Sep 24 13:46:30 2008 +0200
use the LANG environment var to set language of group names & decriptions
diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index 05548bb..1f1f873 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -104,7 +104,8 @@ class PackageKitYumBackend(PackageKitBaseBackend,PackagekitPackage):
signal.signal(signal.SIGQUIT,sigquit)
PackageKitBaseBackend.__init__(self,args)
self.yumbase = PackageKitYumBase(self)
- self._lang = 'C'
+ self._lang = os.environ['LANG']
+ print self._lang
self.comps = yumComps(self.yumbase)
if not self.comps.connect():
self.refresh_cache()
diff --git a/python/wrapper-test.py b/python/wrapper-test.py
index f055335..8265949 100755
--- a/python/wrapper-test.py
+++ b/python/wrapper-test.py
@@ -22,7 +22,7 @@ import sys
from packagekit.client import PackageKitClient
from packagekit.enums import *
-def show_packages(pk,pkgs,details=False,limit=None):
+def show_packages(pkit, pkgs, details=False, limit=None):
i = 0
for pkg in pkgs:
i += 1
@@ -30,9 +30,9 @@ def show_packages(pk,pkgs,details=False,limit=None):
break
show_package(pkg)
if details:
- details = pk.GetDetails(pkg.id)
+ detail = pkit.GetDetails(pkg.id)
print 79 *"-"
- print details[0].detail
+ print detail[0].detail
print 79 *"="
def show_package(pkg):
@@ -63,12 +63,12 @@ if __name__ == '__main__':
if 'all' in cmd or "get-packages" in cmd:
print '---- GetPackages() ----'
packages = pk.GetPackages(FILTER_INSTALLED)
- show_packages(pk,packages,details=True,limit=20)
+ show_packages(pk, packages, details=True, limit=20)
if 'all' in cmd or "search-file" in cmd:
print '---- SearchFile() ----'
pkgs = pk.SearchFile(FILTER_INSTALLED,"/usr/bin/yum")
- show_packages(pk,pkgs)
+ show_packages(pk, pkgs)
if 'all' in cmd or "get-updates" in cmd:
print '---- GetUpdates() ----'
@@ -85,8 +85,8 @@ if __name__ == '__main__':
if "search-group" in cmd:
print '---- SearchGroup() -----'
- show_packages(pk,pk.SearchGroup(FILTER_NONE, GROUP_GAMES))
- show_packages(pk,pk.SearchGroup(FILTER_NONE, GROUP_COLLECTIONS))
+ show_packages(pk, pk.SearchGroup(FILTER_NONE, GROUP_GAMES))
+ show_packages(pk, pk.SearchGroup(FILTER_NONE, GROUP_COLLECTIONS))
if "get-distro-upgrades" in cmd:
print '---- GetDistroUpgrades() -----'
@@ -97,8 +97,9 @@ if __name__ == '__main__':
print "No distribution upgrades"
- def cb(status, pc, spc, el, rem, c):
- print 'install pkg: %s, %i%%, cancel allowed: %s' % (status, pc, str(c))
+ def cb(status, pct, spct, elem, rem, cancel):
+ print 'install pkg: %s, %i%%, cancel allowed: %s' % \
+ (status, pct, str(cancel))
return True
#return pc < 12
commit 614886bbc5da92537c2930d2017739a31b77e4b6
Author: Anders F Bjorklund <afb at users.sourceforge.net>
Date: Tue Sep 23 18:11:38 2008 +0200
trivial: adjust whitespace to make pylint happy^Hier
diff --git a/backends/smart/helpers/smartBackend.py b/backends/smart/helpers/smartBackend.py
index 5706b3b..25d38a9 100755
--- a/backends/smart/helpers/smartBackend.py
+++ b/backends/smart/helpers/smartBackend.py
@@ -127,7 +127,7 @@ class PackageKitSmartProgress(Progress):
self._backend._show_package(subkey)
elif type(subkey) is tuple and len(subkey):
if isinstance(subkey[0], smart.cache.PackageInfo):
- self._backend._show_package(subkey[0].getPackage())
+ self._backend._show_package(subkey[0].getPackage())
class PackageKitSmartBackend(PackageKitBaseBackend):
@@ -294,7 +294,7 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
self.ctrl.downloadPackages(packages, targetdir=directory)
pkgpath = self.ctrl.fetchPackages(packages, targetdir=directory)
- for package,files in pkgpath.iteritems():
+ for package, files in pkgpath.iteritems():
self.files(package, ";".join(files))
@needs_cache
@@ -381,7 +381,8 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
for prv in upg.providedby:
for prvpkg in prv.packages:
if prvpkg.installed:
- upgrades.append(self._package_id(prvpkg, loader))
+ upgrades.append(
+ self._package_id(prvpkg, loader))
upgrades = '^'.join(upgrades)
obsoletes = ''
@@ -794,7 +795,7 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
self.files(packageid, ";".join(paths))
- def _text_to_boolean(self,text):
+ def _text_to_boolean(self, text):
if text == 'true' or text == 'TRUE':
return True
elif text == 'yes' or text == 'YES':
@@ -1024,7 +1025,7 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
self._package_list.append((package, status))
def _show_package_list(self):
- for package,status in self._package_list:
+ for package, status in self._package_list:
self._show_package(package, status)
def _package_id(self, package, loader=None):
@@ -1083,17 +1084,18 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
package = info.getPackage().name
if group == 'User Interface/X' and package.find('-fonts') != -1:
return GROUP_FONTS
- if group == 'Applications/Productivity' and package.find('-langpack') != -1:
+ if group == 'Applications/Productivity' and \
+ package.find('-langpack') != -1:
return GROUP_LOCALIZATION
if group == 'User Interface/Desktops' and filter_desktops:
- if self._package_in_requires(package, "^gnome-desktop") \
- or self._package_in_requires(package, "^gnome-desktop-optional"):
+ if self._package_in_requires(package, "^gnome-desktop") or \
+ self._package_in_requires(package, "^gnome-desktop-optional"):
return GROUP_DESKTOP_GNOME
- if self._package_in_requires(package, "^kde-desktop") \
- or self._package_in_requires(package, "^kde-desktop-optional"):
+ if self._package_in_requires(package, "^kde-desktop") or \
+ self._package_in_requires(package, "^kde-desktop-optional"):
return GROUP_DESKTOP_KDE
- if self._package_in_requires(package, "^xfce-desktop") \
- or self._package_in_requires(package, "^xfce-desktop-optional"):
+ if self._package_in_requires(package, "^xfce-desktop") or \
+ self._package_in_requires(package, "^xfce-desktop-optional"):
return GROUP_DESKTOP_XFCE
group = self.GROUPS[group]
else:
@@ -1274,19 +1276,19 @@ class PackageKitSmartBackend(PackageKitBaseBackend):
def _do_basename_filtering(self, package_list):
basename = {}
- for package,status in package_list:
+ for package, status in package_list:
if self._package_has_basename(package):
- basename[package] = (package,status)
+ basename[package] = (package, status)
return basename.values()
def _do_newest_filtering(self, package_list):
newest = {}
- for package,status in package_list:
+ for package, status in package_list:
name, version, arch = self._splitpackage(package)
key = (name, arch)
if key in newest and package <= newest[key]:
continue
- newest[key] = (package,status)
+ newest[key] = (package, status)
return newest.values()
def _post_process_package_list(self, filters):
More information about the PackageKit-commit
mailing list