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

@ -183,6 +183,12 @@ repository_find_pkg(const char *pattern, const char *reason)
rv = EINVAL;
goto out;
}
/*
* Check if this package should replace other installed packages.
*/
if ((rv = xbps_repository_pkg_replaces(transd, origin_pkgrd)) != 0)
goto out;
/*
* Add the pkg dictionary from repository's index dictionary into
* the "unsorted" array in transaction dictionary.