Added xbps_repository_pkg_replaces() to handle pkg "replaces" in the transaction.

The frontend (in that case xbps-bin(8)) is only responsible to remove
those packages that have the "trans-action" string object set to "remove".
This commit is contained in:
Juan RP
2011-02-01 01:21:54 +01:00
parent 7b159d6f33
commit fdc496e8f1
8 changed files with 163 additions and 123 deletions

View File

@@ -48,6 +48,11 @@ store_dependency(prop_dictionary_t transd, prop_dictionary_t repo_pkgd)
prop_dictionary_get_cstring_nocopy(repo_pkgd, "pkgname", &pkgname);
prop_dictionary_get_cstring_nocopy(repo_pkgd, "pkgver", &pkgver);
prop_dictionary_get_cstring_nocopy(repo_pkgd, "repository", &repoloc);
/*
* Check if this package should replace other installed packages.
*/
if ((rv = xbps_repository_pkg_replaces(transd, repo_pkgd)) != 0)
return rv;
dict = prop_dictionary_copy(repo_pkgd);
if (dict == NULL)