Adapt to the new hawkey API

This commit is contained in:
Richard Hughes 2015-02-06 20:18:00 +00:00
parent d92e3a4a1f
commit 80d3427697
2 changed files with 36 additions and 1 deletions

View File

@ -0,0 +1,28 @@
From 5630095714ec012401accddb070c9850dad7773d Mon Sep 17 00:00:00 2001
From: Richard Hughes <richard@hughsie.com>
Date: Fri, 6 Feb 2015 20:14:16 +0000
Subject: [PATCH] hif: Adapt to the new Hawkey API
---
backends/hif/pk-backend-hif.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/backends/hif/pk-backend-hif.c b/backends/hif/pk-backend-hif.c
index bc9bef2..2e497cd 100644
--- a/backends/hif/pk-backend-hif.c
+++ b/backends/hif/pk-backend-hif.c
@@ -650,7 +650,11 @@ hif_utils_create_sack_for_filters (PkBackendJob *job,
/* create empty sack */
solv_dir = hif_utils_real_path (hif_context_get_solv_dir (priv->context));
install_root = hif_utils_real_path (hif_context_get_install_root (priv->context));
+#if HY_VERSION_CHECK(0,5,3)
+ sack = hy_sack_create (solv_dir, NULL, install_root, NULL, HY_MAKE_CACHE_DIR);
+#else
sack = hy_sack_create (solv_dir, NULL, install_root, HY_MAKE_CACHE_DIR);
+#endif
if (sack == NULL) {
ret = hif_error_set_from_hawkey (hy_get_errno (), error);
g_prefix_error (error, "failed to create sack in %s for %s: ",
--
2.1.0

View File

@ -7,7 +7,7 @@
Summary: Package management service
Name: PackageKit
Version: 1.0.4
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv2+ and LGPLv2+
URL: http://www.freedesktop.org/software/PackageKit/
Source0: http://www.freedesktop.org/software/PackageKit/releases/%{name}-%{version}.tar.xz
@ -18,6 +18,9 @@ Source1: cached-metadata.tar
# Fedora-specific: set Vendor.conf up for Fedora.
Patch0: PackageKit-0.3.8-Fedora-Vendor.conf.patch
# Already upstream
Patch1: 0001-hif-Adapt-to-the-new-Hawkey-API.patch
Requires: %{name}-glib%{?_isa} = %{version}-%{release}
Requires: shared-mime-info
Requires: comps-extras
@ -173,6 +176,7 @@ using PackageKit.
%prep
%setup -q
%patch0 -p1 -b .fedora
%patch1 -p1 -b .new-hawkey-api
%build
%configure \
@ -311,6 +315,9 @@ systemctl disable packagekit-offline-update.service > /dev/null 2>&1 || :
%{_datadir}/gtk-doc/html/PackageKit
%changelog
* Fri Feb 06 2015 Richard Hughes <rhughes@redhat.com> - 1.0.4-2
- Adapt to the new hawkey API.
* Mon Jan 19 2015 Richard Hughes <rhughes@redhat.com> - 1.0.4-1
- New upstream release
- Actually inhibit logind when the transaction can't be cancelled