kalev pushed to libhif (f22-beta). "Remove obsoleted packages when committing transaction (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Wed Apr 15 22:12:50 UTC 2015


>From 6eb0ac2dcd510b7f8f4c80a83441150467503524 Mon Sep 17 00:00:00 2001
From: Kalev Lember <kalevlember at gmail.com>
Date: Wed, 15 Apr 2015 21:13:03 +0200
Subject: Remove obsoleted packages when committing transaction

https://bugzilla.redhat.com/show_bug.cgi?id=1211991

diff --git a/0001-transaction-Remove-obsoleted-packages-when-committin.patch b/0001-transaction-Remove-obsoleted-packages-when-committin.patch
new file mode 100644
index 0000000..8d7a169
--- /dev/null
+++ b/0001-transaction-Remove-obsoleted-packages-when-committin.patch
@@ -0,0 +1,29 @@
+From d8c8a2491e20996a5e1cbd428e38eb5cdeccd342 Mon Sep 17 00:00:00 2001
+From: Kalev Lember <kalevlember at gmail.com>
+Date: Wed, 15 Apr 2015 21:05:13 +0200
+Subject: [PATCH] transaction: Remove obsoleted packages when committing the
+ transaction
+
+This matches the behaviour with DNF / yum that automatically remove any
+obsoleted packages.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1211991
+---
+ libhif/hif-transaction.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libhif/hif-transaction.c b/libhif/hif-transaction.c
+index 40a0f7c..2c929bb 100644
+--- a/libhif/hif-transaction.c
++++ b/libhif/hif-transaction.c
+@@ -1272,6 +1272,7 @@ hif_transaction_commit (HifTransaction *transaction,
+ 
+ 	/* add things to remove */
+ 	priv->remove = hif_goal_get_packages (goal,
++					      HIF_PACKAGE_INFO_OBSOLETE,
+ 					      HIF_PACKAGE_INFO_REMOVE,
+ 					      -1);
+ 	for (i = 0; i < priv->remove->len; i++) {
+-- 
+2.3.5
+
diff --git a/libhif.spec b/libhif.spec
index f42d1a9..3f5a419 100644
--- a/libhif.spec
+++ b/libhif.spec
@@ -1,7 +1,7 @@
 Summary:   Simple package library built on top of hawkey and librepo
 Name:      libhif
 Version:   0.1.8
-Release:   7%{?dist}
+Release:   8%{?dist}
 License:   LGPLv2+
 URL:       https://github.com/hughsie/libhif
 Source0:   http://people.freedesktop.org/~hughsient/releases/libhif-%{version}.tar.xz
@@ -23,6 +23,8 @@ BuildRequires: automake autoconf libtool
 Patch0:    0001-Ensure-the-mirror-list-is-set-before-trying-to-downl.patch
 Patch1:    0001-If-the-enabled-local-source-does-not-exist-do-not-ad.patch
 Patch2:    adapt-to-new-hawkey-api.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=1211991
+Patch3:    0001-transaction-Remove-obsoleted-packages-when-committin.patch
 
 %description
 This library provides a simple interface to hawkey and librepo and is currently
@@ -40,6 +42,7 @@ GLib headers and libraries for libhif.
 %patch0 -p1 -b .naughty-librepo
 %patch1 -p1 -b .file-repo-not-exists
 %patch2 -p1 -b .pointless-api-break
+%patch3 -p1 -b .obsoletes
 
 %build
 # Support builds of both git snapshots and tarballs
@@ -75,6 +78,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libhif*.la
 %{_datadir}/gir-1.0/*.gir
 
 %changelog
+* Wed Apr 15 2015 Kalev Lember <kalevlember at gmail.com> - 0.1.8-8
+- Remove obsoleted packages when committing transaction (#1211991)
+
 * Sat Mar 28 2015 Kalev Lember <kalevlember at gmail.com> - 0.1.8-7
 - Fix broken -devel package requires
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/libhif.git/commit/?h=f22-beta&id=6eb0ac2dcd510b7f8f4c80a83441150467503524


More information about the scm-commits mailing list