rpms/PackageKit/F-11 PackageKit-0.4.6-Presto-handle-downloading-updates.patch, 1.1, 1.2 PackageKit.spec, 1.102, 1.103
Richard Hughes
rhughes at fedoraproject.org
Tue Apr 21 10:19:58 UTC 2009
Author: rhughes
Update of /cvs/pkgs/rpms/PackageKit/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv3571
Modified Files:
PackageKit-0.4.6-Presto-handle-downloading-updates.patch
PackageKit.spec
Log Message:
* Tue Apr 21 2009 Richard Hughes <rhughes at redhat.com> - 0.4.6-5
- Rework one of the Presto patches so that it works with multiple packages.
PackageKit-0.4.6-Presto-handle-downloading-updates.patch:
Index: PackageKit-0.4.6-Presto-handle-downloading-updates.patch
===================================================================
RCS file: /cvs/pkgs/rpms/PackageKit/F-11/PackageKit-0.4.6-Presto-handle-downloading-updates.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- PackageKit-0.4.6-Presto-handle-downloading-updates.patch 20 Apr 2009 10:32:45 -0000 1.1
+++ PackageKit-0.4.6-Presto-handle-downloading-updates.patch 21 Apr 2009 10:19:55 -0000 1.2
@@ -1,28 +1,39 @@
-commit dd136f6760d375ba55ec98ab02291028c03d8b46
-Author: Richard Hughes <richard at hughsie.com>
-Date: Sun Apr 19 11:59:42 2009 +0100
-
- yum: Deal with Presto downloading updates in a better way
-
diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
-index 5870eb7..7119c6a 100755
+index f13bd9d..7c29941 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
-@@ -36,6 +36,7 @@ from yum.callbacks import *
- from yum.misc import prco_tuple_to_string, unique
- from yum.packages import YumLocalPackage, parsePackages
- from yum.packageSack import MetaSack
-+from yum.sqlitesack import YumAvailablePackageSqlite
- import rpmUtils
- import exceptions
- import types
-@@ -2559,6 +2560,9 @@ class DownloadCallback(BaseMeter):
- for pkg in self.saved_pkgs:
- if isinstance(pkg, YumLocalPackage):
- rpmfn = pkg.localPkg
-+ elif isinstance(pkg, YumAvailablePackageSqlite):
-+ # from yum-presto, so not a local package
-+ return pkg
- else:
- rpmfn = os.path.basename(pkg.remote_path) # get the rpm filename of the package
- if rpmfn == name:
+@@ -2521,14 +2521,26 @@ class DownloadCallback(BaseMeter):
+ self.percent_start = percent_start
+
+ def _getPackage(self, name):
+- if self.saved_pkgs:
+- for pkg in self.saved_pkgs:
+- if isinstance(pkg, YumLocalPackage):
+- rpmfn = pkg.localPkg
+- else:
+- rpmfn = os.path.basename(pkg.remote_path) # get the rpm filename of the package
+- if rpmfn == name:
+- return pkg
++
++ # no download data
++ if not self.saved_pkgs:
++ return None
++
++ # split into name, version, release
++ # for yum, name is:
++ # - gnote-0.1.2-2.fc11.i586.rpm
++ # and for Presto:
++ # - gnote-0.1.1-4.fc11_0.1.2-2.fc11.i586.drpm
++ sections = name.rsplit('-', 3)
++ if len(sections) < 3:
++ return None
++
++ # we need to search the saved packages for a match and then return the pkg
++ for pkg in self.saved_pkgs:
++ if sections[0] == pkg.name:
++ return pkg
++
++ # nothing matched
+ return None
+
+ def update(self, amount_read, now=None):
Index: PackageKit.spec
===================================================================
RCS file: /cvs/pkgs/rpms/PackageKit/F-11/PackageKit.spec,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -r1.102 -r1.103
--- PackageKit.spec 20 Apr 2009 10:32:45 -0000 1.102
+++ PackageKit.spec 21 Apr 2009 10:19:55 -0000 1.103
@@ -10,7 +10,7 @@
Name: PackageKit
Version: 0.4.6
#Release: 0.3.%{?alphatag}git%{?dist}
-Release: 4%{?dist}
+Release: 5%{?dist}
License: GPLv2+
Group: System Environment/Libraries
URL: http://www.packagekit.org
@@ -450,6 +450,9 @@
%{_includedir}/PackageKit/backend/*.h
%changelog
+* Tue Apr 21 2009 Richard Hughes <rhughes at redhat.com> - 0.4.6-5
+- Rework one of the Presto patches so that it works with multiple packages.
+
* Sun Apr 19 2009 Richard Hughes <rhughes at redhat.com> - 0.4.6-4
- Backport 2 patches from upstream to make Presto work better with PK.
More information about the scm-commits
mailing list