- Install the usr/share/cmake/Modules/FindQPackageKit.cmake file so we can

build KPackageKit from svn head.
- Fix installing the preupgrade package when we check for distro upgrades
    on machines with 32 and 64 bit versions available. Fixes #469172
This commit is contained in:
Richard Hughes 2008-10-30 16:32:18 +00:00
parent 1f2e10143f
commit c9b571ebef
3 changed files with 71 additions and 1 deletions

View File

@ -8,7 +8,7 @@
Summary: System daemon that is a DBUS abstraction layer for package management
Name: PackageKit
Version: 0.3.9
Release: 2%{?dist}
Release: 3%{?dist}
License: GPLv2+
Group: System Environment/Libraries
URL: http://packagekit.freedesktop.org
@ -25,6 +25,12 @@ Patch1: pk-yum-fix-devel-filtering.patch
# upstream, 211b538cd0d6e420f288af49f7bb106cf99b4ce6
Patch2: pk-fix-browser-plugin.patch
# upstream, 746b79e082e696b6eae9df10916e00e2a847b138
Patch3: pk-install-qt-cmake-build.patch
# upstream, 32f39d67971f1bd6dbf4b559a8f95e8712edccf8
Patch4: pk-fix-get-distro-upgrade.patch
Requires: dbus >= %{dbus_version}
Requires: dbus-glib >= %{dbus_glib_version}
Requires: PackageKit-glib = %{version}-%{release}
@ -208,6 +214,8 @@ codecs from configured repositories using PackageKit.
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
%configure --enable-yum --enable-smart --with-default-backend=yum --disable-local
@ -371,6 +379,7 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%dir %{_includedir}/PackageKit/packagekit-qt
%{_includedir}/PackageKit/packagekit-qt/QPackageKit
%{_includedir}/PackageKit/packagekit-qt/*.h
%{_datadir}/cmake/Modules/FindQPackageKit.cmake
%files backend-devel
%defattr(-,root,root,-)
@ -380,6 +389,12 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%{_includedir}/PackageKit/backend/*.h
%changelog
* Thu Oct 28 2008 Richard Hughes <rhughes@redhat.com> - 0.3.9-3
- Install the usr/share/cmake/Modules/FindQPackageKit.cmake file so we
can build KPackageKit from svn head.
- Fix installing the preupgrade package when we check for distro upgrades
on machines with 32 and 64 bit versions available. Fixes #469172
* Tue Oct 28 2008 Richard Hughes <rhughes@redhat.com> - 0.3.9-2
- Apply a couple of patches from upstream to fix development filtering
and installing the web plugin.

View File

@ -0,0 +1,34 @@
commit 32f39d67971f1bd6dbf4b559a8f95e8712edccf8
Author: Richard Hughes <richard@hughsie.com>
Date: Thu Oct 30 16:22:47 2008 +0000
bugfix: yum: fix getting distibution upgrade information when we have multiple repos providing preupgrade. Fixes rh#469172
diff --git a/backends/yum/yumBackend.py b/backends/yum/yumBackend.py
index 9a75200..85cf4da 100755
--- a/backends/yum/yumBackend.py
+++ b/backends/yum/yumBackend.py
@@ -1657,15 +1657,17 @@ class PackageKitYumBackend(PackageKitBaseBackend, PackagekitPackage):
pkgs = self.yumbase.rpmdb.searchNevra(name='preupgrade')
if len(pkgs) == 0:
#install preupgrade
- pkgs = self.yumbase.pkgSack.searchNevra(name='preupgrade')
+ pkgs = self.yumbase.pkgSack.returnNewestByName(name='preupgrade')
if len(pkgs) == 0:
self.error(ERROR_PACKAGE_NOT_FOUND, "Could not find upgrade preupgrade package in any enabled repos")
- elif len(pkgs) == 1:
- txmbr = self.yumbase.install(po=pkgs[0])
- if txmbr:
- self._runYumTransaction()
+ # we can have more than one result if the package is in multiple repos, for example
+ # a machine with i386 _and_ x86_64 configured.
+ # in this case, just pick the first entry as they are both noarch
+ txmbr = self.yumbase.install(po=pkgs[0])
+ if txmbr:
+ self._runYumTransaction()
else:
- self.error(ERROR_INTERNAL_ERROR, "not one update possibility")
+ self.error(ERROR_INTERNAL_ERROR, "could not install preupgrade as no transaction")
elif len(pkgs) == 1:
# check if there are any updates to the preupgrade package
po = pkgs[0]

View File

@ -0,0 +1,21 @@
commit 746b79e082e696b6eae9df10916e00e2a847b138
Author: Richard Hughes <richard@hughsie.com>
Date: Mon Oct 27 16:57:18 2008 +0000
bugfix: install FindQPackageKit.cmake as KPackageKit needs it to build
diff --git a/lib/packagekit-qt/modules/Makefile.am b/lib/packagekit-qt/modules/Makefile.am
index cd3b443..a61e00b 100644
--- a/lib/packagekit-qt/modules/Makefile.am
+++ b/lib/packagekit-qt/modules/Makefile.am
@@ -1,3 +1,9 @@
+cmakemoduledir = $(datadir)/cmake/Modules
+cmakemodule_DATA = \
+ FindQPackageKit.cmake \
+ $(NULL)
+
EXTRA_DIST = \
CMakeLists.txt \
- FindQPackageKit.cmake
+ $(cmakemodule_DATA)
+