From d8c8a2491e20996a5e1cbd428e38eb5cdeccd342 Mon Sep 17 00:00:00 2001
From: Kalev Lember <kalevlember@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