From 450bf2713db12cd4237d9804df8532915d6ca168 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 16 Dec 2011 10:21:51 +0100 Subject: [PATCH] Also purge packages to replaced in transaction. --- include/xbps_api.h | 2 +- lib/transaction_package_replace.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/xbps_api.h b/include/xbps_api.h index 58f8d27e..66103ed1 100644 --- a/include/xbps_api.h +++ b/include/xbps_api.h @@ -56,7 +56,7 @@ */ #define XBPS_PKGINDEX_VERSION "1.3" -#define XBPS_API_VERSION "20111215-2" +#define XBPS_API_VERSION "20111216" #define XBPS_VERSION "0.11.0" /** diff --git a/lib/transaction_package_replace.c b/lib/transaction_package_replace.c index bb7be887..735b5f4c 100644 --- a/lib/transaction_package_replace.c +++ b/lib/transaction_package_replace.c @@ -121,7 +121,8 @@ xbps_transaction_package_replace(prop_dictionary_t transd) * If new package is providing a virtual package to the * package that we want to replace we should respect * its requiredby and automatic-install objects, so copy - * them to the pkg's dictionary in transaction. + * them to the pkg's dictionary in transaction. Also + * make sure that replaced package is also purged. */ if (xbps_match_virtual_pkg_in_dict(pkg_repod, pattern, true) || @@ -136,6 +137,8 @@ xbps_transaction_package_replace(prop_dictionary_t transd) "automatic-install", instd_auto); prop_dictionary_set_bool(pkg_repod, "replacing-package", true); + prop_dictionary_set_bool(instd, + "remove-and-purge", true); } /* * Add package dictionary into the transaction and mark