kalev pushed to libhif (master). "Remove obsoleted packages when committing transaction (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Wed Apr 15 19:45:58 UTC 2015


>From 18ef51abf53739e061da8864eb33b409dcb6a2fd 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 5634fb1..f2de8d5 100644
--- a/libhif.spec
+++ b/libhif.spec
@@ -1,10 +1,12 @@
 Summary:   Simple package library built on top of hawkey and librepo
 Name:      libhif
 Version:   0.2.0
-Release:   1%{?dist}
+Release:   2%{?dist}
 License:   LGPLv2+
 URL:       https://github.com/hughsie/libhif
 Source0:   http://people.freedesktop.org/~hughsient/releases/libhif-%{version}.tar.xz
+# https://bugzilla.redhat.com/show_bug.cgi?id=1211991
+Patch0:    0001-transaction-Remove-obsoleted-packages-when-committin.patch
 
 BuildRequires: glib2-devel >= 2.16.1
 BuildRequires: libtool
@@ -32,6 +34,7 @@ GLib headers and libraries for libhif.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 # Support builds of both git snapshots and tarballs
@@ -67,6 +70,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.2.0-2
+- Remove obsoleted packages when committing transaction (#1211991)
+
 * Wed Apr 08 2015 Richard Hughes <richard at hughsie.com> 0.2.0-1
 - Update to new upstream version
 - Add new API required for ostree
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/libhif.git/commit/?h=master&id=18ef51abf53739e061da8864eb33b409dcb6a2fd


More information about the scm-commits mailing list