Introduce XBPS_STATE_CONFIGURE_DONE and use it in xbps-reconfigure(8).

This commit is contained in:
Juan RP
2013-03-07 09:24:04 +01:00
parent 37263d63c9
commit 90b6803825
4 changed files with 16 additions and 3 deletions

View File

@ -72,7 +72,7 @@ xbps_configure_packages(struct xbps_handle *xhp, bool flush)
}
prop_object_iterator_release(iter);
if (flush)
if ((rv == 0) && flush)
rv = xbps_pkgdb_update(xhp, true);
return rv;
@ -152,6 +152,7 @@ xbps_configure_pkg(struct xbps_handle *xhp,
xbps_set_cb_state(xhp, XBPS_STATE_CONFIGURE_FAIL, rv,
pkgver, "%s: [configure] failed to set state to installed: %s",
pkgver, strerror(rv));
return rv;
}
if (flush) {
if ((rv = xbps_pkgdb_update(xhp, true)) != 0) {
@ -162,5 +163,8 @@ xbps_configure_pkg(struct xbps_handle *xhp,
}
prop_object_release(pkgmetad);
if (rv == 0)
xbps_set_cb_state(xhp, XBPS_STATE_CONFIGURE_DONE, 0, pkgver, NULL);
return rv;
}