xbps-pkgdb: simplify the check code; make the reqby check work again.

This commit is contained in:
Juan RP
2012-11-17 17:43:54 +01:00
parent fcdb6b0930
commit e763f154a0
8 changed files with 70 additions and 146 deletions

View File

@@ -43,23 +43,18 @@
* and remove them if that was true.
*/
int
check_pkg_unneeded(struct xbps_handle *xhp,
const char *pkgname,
void *arg,
bool *pkgdb_update)
check_pkg_unneeded(struct xbps_handle *xhp, const char *pkgname, void *arg)
{
prop_dictionary_t pkgd = arg;
(void)pkgname;
(void)xhp;
(void)pkgname;
if (prop_dictionary_get(pkgd, "remove-and-update")) {
*pkgdb_update = true;
if (prop_dictionary_get(pkgd, "remove-and-update"))
prop_dictionary_remove(pkgd, "remove-and-update");
}
if (prop_dictionary_get(pkgd, "transaction")) {
*pkgdb_update = true;
if (prop_dictionary_get(pkgd, "transaction"))
prop_dictionary_remove(pkgd, "transaction");
}
return 0;
}