rpms/PackageKit/F-11 PackageKit-0.4.8-do-newest-unordered.patch, NONE, 1.1 PackageKit-0.4.8-fix-get-restart-required-all-packages.patch, NONE, 1.1 PackageKit-0.4.8-fix-get-restart-required.patch, NONE, 1.1 PackageKit-0.4.8-no-network-hardcode.patch, NONE, 1.1 PackageKit-0.4.8-subclass-mime-types.patch, NONE, 1.1 PackageKit-0.4.8-yum-float-version.patch, NONE, 1.1 PackageKit.spec, 1.108, 1.109

Richard Hughes rhughes at fedoraproject.org
Mon Jul 6 10:23:12 UTC 2009


Author: rhughes

Update of /cvs/pkgs/rpms/PackageKit/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv4959

Modified Files:
	PackageKit.spec 
Added Files:
	PackageKit-0.4.8-do-newest-unordered.patch 
	PackageKit-0.4.8-fix-get-restart-required-all-packages.patch 
	PackageKit-0.4.8-fix-get-restart-required.patch 
	PackageKit-0.4.8-no-network-hardcode.patch 
	PackageKit-0.4.8-subclass-mime-types.patch 
	PackageKit-0.4.8-yum-float-version.patch 
Log Message:
* Mon Jul 06 2009 Richard Hughes  <rhughes at redhat.com> - 0.4.8-2
- Pull in some patches from upstream PACKAGEKIT_0_4_X branch
 - Do newest filtering when the list isn't ordered
 - Don't check ts_state when getting the restart-required signal
 - Provide restart-required data for all the packages
 - Don't hardcode network access to install or update packages.
 - Correctly subclass mime-types.
 - Fix an error when getting the distro version of rawhide.
- Fixes #506110, #504137 and #506649


PackageKit-0.4.8-do-newest-unordered.patch:

--- NEW FILE PackageKit-0.4.8-do-newest-unordered.patch ---
commit cdec15bbbb433f9e47c75467bafd31711b10fc93
Author: Richard Hughes <richard at hughsie.com>
Date:   Mon Jun 29 12:42:02 2009 +0100

    yum: do newest filtering when the list isn't ordered

diff --git a/backends/yum/yumFilter.py b/backends/yum/yumFilter.py
index e3cb3f3..70a12ba 100644
--- a/backends/yum/yumFilter.py
+++ b/backends/yum/yumFilter.py
@@ -90,8 +90,17 @@ class YumFilter(PackagekitFilter):
             # only key on name and not arch
             inst = self._pkg_is_installed(pkg)
             key = (pkg.name, inst)
-            if key in newest and pkg <= newest[key][0]:
-                continue
+
+            # we've already come across this package
+            if key in newest:
+
+                # the current package is older (or the same) than the one we have stored
+                if pkg <= newest[key][0]:
+                    continue
+
+                # the current package is newer than what we have stored, so nuke the old package
+                del newest[key]
+
             newest[key] = (pkg, state)
         return newest.values()
 

PackageKit-0.4.8-fix-get-restart-required-all-packages.patch:

--- NEW FILE PackageKit-0.4.8-fix-get-restart-required-all-packages.patch ---
commit a5fd8ab0411f918970d9abdf03ca83635ad58518
Author: Richard Hughes <richard at hughsie.com>
Date:   Mon Jun 22 10:20:04 2009 +0100

    yum: Provide restart-required data for all the packages, not just the first update in the list

diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index f38fade..0b6a333 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -1820,7 +1820,6 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
             if (pkg.name in self.rebootpkgs \
                 or (notice and notice.get_metadata().has_key('reboot_suggested') and notice['reboot_suggested'])):
                 self.require_restart(RESTART_SYSTEM, self._pkg_to_id(pkg))
-                break
 
     def _runYumTransaction(self, allow_remove_deps=None, allow_skip_broken=False):
         '''

PackageKit-0.4.8-fix-get-restart-required.patch:

--- NEW FILE PackageKit-0.4.8-fix-get-restart-required.patch ---
commit 205eba3727d1cad96baa42a4d38122bb997e520f
Author: Richard Hughes <richard at hughsie.com>
Date:   Mon Jun 22 10:19:08 2009 +0100

    yum: Don't check ts_state when getting the restart-required signal

diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index b27d378..f38fade 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -1818,8 +1818,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
             # in the update metadata and is installed/updated etc
             notice = md.get_notice((pkg.name, pkg.version, pkg.release))
             if (pkg.name in self.rebootpkgs \
-                or (notice and notice.get_metadata().has_key('reboot_suggested') and notice['reboot_suggested']))\
-                and txmbr.ts_state in TS_INSTALL_STATES:
+                or (notice and notice.get_metadata().has_key('reboot_suggested') and notice['reboot_suggested'])):
                 self.require_restart(RESTART_SYSTEM, self._pkg_to_id(pkg))
                 break
 

PackageKit-0.4.8-no-network-hardcode.patch:

--- NEW FILE PackageKit-0.4.8-no-network-hardcode.patch ---
commit 64997e86e36e1c6964289eec657d1595c92cd534
Author: Richard Hughes <richard at hughsie.com>
Date:   Mon Jun 15 17:26:03 2009 +0100

    yum: don't hardcode network access to install or update packages. Fixes rh#506110

diff --git a/backends/yum/pk-backend-yum.c b/backends/yum/pk-backend-yum.c
index 3e27710..7dabed7 100644
--- a/backends/yum/pk-backend-yum.c
+++ b/backends/yum/pk-backend-yum.c
@@ -265,13 +265,6 @@ backend_install_packages (PkBackend *backend, gchar **package_ids)
 {
 	gchar *package_ids_temp;
 
-	/* check network state */
-	if (!pk_backend_is_online (backend)) {
-		pk_backend_error_code (backend, PK_ERROR_ENUM_NO_NETWORK, "Cannot install when offline");
-		pk_backend_finished (backend);
-		return;
-	}
-
 	/* send the complete list as stdin */
 	package_ids_temp = pk_package_ids_to_text (package_ids);
 	pk_backend_spawn_helper (spawn, "yumBackend.py", "install-packages", package_ids_temp, NULL);
@@ -391,13 +384,6 @@ backend_update_packages (PkBackend *backend, gchar **package_ids)
 {
 	gchar *package_ids_temp;
 
-	/* check network state */
-	if (!pk_backend_is_online (backend)) {
-		pk_backend_error_code (backend, PK_ERROR_ENUM_NO_NETWORK, "Cannot install when offline");
-		pk_backend_finished (backend);
-		return;
-	}
-
 	/* send the complete list as stdin */
 	package_ids_temp = pk_package_ids_to_text (package_ids);
 	pk_backend_spawn_helper (spawn, "yumBackend.py", "update-packages", package_ids_temp, NULL);

PackageKit-0.4.8-subclass-mime-types.patch:

--- NEW FILE PackageKit-0.4.8-subclass-mime-types.patch ---
commit fdfbd193e8c5e21bc381b805c5e06ee40000a495
Author: Richard Hughes <richard at hughsie.com>
Date:   Fri Jun 12 10:30:22 2009 +0100

    Add subclasses to our registered mime-types. Fixes rh#504137

diff --git a/data/packagekit-catalog.xml.in b/data/packagekit-catalog.xml.in
index d25210f..df04ca8 100644
--- a/data/packagekit-catalog.xml.in
+++ b/data/packagekit-catalog.xml.in
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
   <mime-type type="application/x-catalog">
+    <sub-class-of type="text/plain"/>
     <_comment>PackageKit Catalog</_comment>
     <glob pattern="*.catalog"/>
   </mime-type>
diff --git a/data/packagekit-package-list.xml.in b/data/packagekit-package-list.xml.in
index f08d411..7b063b3 100644
--- a/data/packagekit-package-list.xml.in
+++ b/data/packagekit-package-list.xml.in
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
   <mime-type type="application/x-package-list">
+    <sub-class-of type="text/plain"/>
     <_comment>PackageKit Package List</_comment>
     <glob pattern="*.package-list"/>
   </mime-type>
diff --git a/data/packagekit-servicepack.xml.in b/data/packagekit-servicepack.xml.in
index 65b5d12..0bcd1d8 100644
--- a/data/packagekit-servicepack.xml.in
+++ b/data/packagekit-servicepack.xml.in
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
   <mime-type type="application/x-servicepack">
+    <sub-class-of type="application/x-tar"/>
     <_comment>PackageKit Service Pack</_comment>
     <glob pattern="*.servicepack"/>
   </mime-type>

PackageKit-0.4.8-yum-float-version.patch:

--- NEW FILE PackageKit-0.4.8-yum-float-version.patch ---
commit d8089794c91c8c8429ca3e794465a322eea136d6
Author: Richard Hughes <richard at hughsie.com>
Date:   Thu Jun 18 08:13:00 2009 +0100

    yum: use a float for present_version as rawhide is 11.90. Fixes rh#506649

diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index 4d84d47..b27d378 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -2146,7 +2146,7 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
 
         # are we already on the latest version
         try:
-            present_version = self.yumbase.conf.yumvar['releasever']
+            present_version = float(self.yumbase.conf.yumvar['releasever'])
         except Exception, e:
             self.error(ERROR_INTERNAL_ERROR, _format_str(traceback.format_exc()))
         if (present_version >= last_version):


Index: PackageKit.spec
===================================================================
RCS file: /cvs/pkgs/rpms/PackageKit/F-11/PackageKit.spec,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -p -r1.108 -r1.109
--- PackageKit.spec	1 Jun 2009 10:19:08 -0000	1.108
+++ PackageKit.spec	6 Jul 2009 10:23:11 -0000	1.109
@@ -10,7 +10,7 @@ Summary:   Package management service
 Name:      PackageKit
 Version:   0.4.8
 #Release:   0.3.%{?alphatag}git%{?dist}
-Release:   1%{?dist}
+Release:   2%{?dist}
 License:   GPLv2+
 Group:     System Environment/Libraries
 URL:       http://www.packagekit.org
@@ -24,6 +24,24 @@ Patch0:    PackageKit-0.3.8-Fedora-Vendo
 # Fedora specific: the yum backend doesn't do time estimation correctly
 Patch1:    PackageKit-0.4.4-Fedora-turn-off-time.conf.patch
 
+# Upstream: cdec15bbbb433f9e47c75467bafd31711b10fc93
+Patch2:    PackageKit-0.4.8-do-newest-unordered.patch
+
+# Upstream: 205eba3727d1cad96baa42a4d38122bb997e520f
+Patch3:    PackageKit-0.4.8-fix-get-restart-required.patch
+
+# Upstream: a5fd8ab0411f918970d9abdf03ca83635ad58518
+Patch4:    PackageKit-0.4.8-fix-get-restart-required-all-packages.patch
+
+# Upstream: 64997e86e36e1c6964289eec657d1595c92cd534
+Patch5:    PackageKit-0.4.8-no-network-hardcode.patch
+
+# Upstream: fdfbd193e8c5e21bc381b805c5e06ee40000a495
+Patch6:    PackageKit-0.4.8-subclass-mime-types.patch
+
+# Upstream: d8089794c91c8c8429ca3e794465a322eea136d6
+Patch7:    PackageKit-0.4.8-yum-float-version.patch
+
 Requires: dbus >= %{dbus_version}
 Requires: dbus-glib >= %{dbus_glib_version}
 Requires: PackageKit-glib = %{version}-%{release}
@@ -217,6 +235,12 @@ using PackageKit.
 %setup -q
 %patch0 -p1 -b .fedora
 %patch1 -p1 -b .no-time
+%patch2 -p1 -b .do-newest-unordered
+%patch3 -p1 -b .fix-get-restart-required
+%patch4 -p1 -b .fix-get-restart-required-all-packages
+%patch5 -p1 -b .no-network-hardcode
+%patch6 -p1 -b .subclass-mime-types
+%patch7 -p1 -b .yum-float-version
 
 %build
 %configure --enable-yum --enable-smart --with-default-backend=yum --disable-local --disable-ruck
@@ -402,6 +426,16 @@ update-mime-database %{_datadir}/mime &>
 %{_includedir}/PackageKit/backend/*.h
 
 %changelog
+* Mon Jul 06 2009 Richard Hughes  <rhughes at redhat.com> - 0.4.8-2
+- Pull in some patches from upstream PACKAGEKIT_0_4_X branch
+ - Do newest filtering when the list isn't ordered
+ - Don't check ts_state when getting the restart-required signal
+ - Provide restart-required data for all the packages
+ - Don't hardcode network access to install or update packages.
+ - Correctly subclass mime-types.
+ - Fix an error when getting the distro version of rawhide.
+- Fixes #506110, #504137 and #506649
+
 * Mon Jun 05 2009 Richard Hughes  <rhughes at redhat.com> - 0.4.8-1
 - New upstream version, many bugfixes and performance fixes
 - Fixes #487614, #500428 and #502399




More information about the fedora-extras-commits mailing list