Also purge packages to replaced in transaction.

This commit is contained in:
Juan RP 2011-12-16 10:21:51 +01:00
parent 2bc9890eb6
commit 450bf2713d
2 changed files with 5 additions and 2 deletions

View File

@ -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"
/**

View File

@ -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