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:
@ -63,14 +63,13 @@ cb_pkg_integrity(prop_object_t obj, void *arg, bool *done)
|
||||
int
|
||||
check_pkg_integrity_all(void)
|
||||
{
|
||||
struct xbps_handle *xhp = xbps_handle_get();
|
||||
struct checkpkg cpkg;
|
||||
int rv;
|
||||
|
||||
memset(&cpkg, 0, sizeof(cpkg));
|
||||
(void)xbps_pkgdb_foreach_cb(cb_pkg_integrity, &cpkg);
|
||||
if (cpkg.flush) {
|
||||
if ((rv = xbps_pkgdb_update(xhp, true)) != 0) {
|
||||
if ((rv = xbps_pkgdb_update(true)) != 0) {
|
||||
xbps_error_printf("failed to write pkgdb: %s\n",
|
||||
strerror(rv));
|
||||
return rv;
|
||||
|
Reference in New Issue
Block a user