Simplify xbps_transaction_prepare()/commit() and related API changes.

- xbps_handle::transd -> new member with transaction dictionary.
- xbps_transaction_prepare: returns an int.
- xbps_transaction_commit: doesn't need any arg now.
- xbps_repository_pool_sync: doesn't need any arg now.
- xbps_pkgdb_update: removed xbps_handle * arg.
- xbps_transaction_missingdeps_get: removed, missing_deps array is in
  xbps_handle::transd("missing_deps") array object.
This commit is contained in:
Juan RP
2012-01-22 10:00:46 +01:00
parent 38db570c19
commit a166d6a2a3
14 changed files with 183 additions and 235 deletions

View File

@ -62,12 +62,11 @@ configure_pkgs_cb(prop_object_t obj, void *arg, bool *done)
int
xbps_configure_packages(bool flush)
{
struct xbps_handle *xhp = xbps_handle_get();
int rv;
rv = xbps_pkgdb_foreach_cb(configure_pkgs_cb, NULL);
if (rv == 0 && flush)
rv = xbps_pkgdb_update(xhp, true);
rv = xbps_pkgdb_update(true);
return rv;
}
@ -169,7 +168,7 @@ xbps_configure_pkg(const char *pkgname,
}
free(pkgver);
if (flush)
rv = xbps_pkgdb_update(xhp, true);
rv = xbps_pkgdb_update(true);
return rv;
}