lib/transaction_commit.c: don't configure already unpacked packages early

This makes --unpack-only also skip the configure for currently unpacked
packages and configures unpacked packages together with all other
pckages.
This commit is contained in:
Duncan Overbruck 2021-06-12 15:55:21 +02:00
parent ab3fb82a7f
commit c94648630c
No known key found for this signature in database
GPG Key ID: 335C1D17EC3D6E35

View File

@ -173,18 +173,6 @@ xbps_transaction_commit(struct xbps_handle *xhp)
} }
continue; continue;
} else if (ttype == XBPS_TRANS_CONFIGURE) {
/*
* Reconfigure pending package.
*/
rv = xbps_configure_pkg(xhp, pkgver, false, false);
if (rv != 0) {
xbps_dbg_printf(xhp, "[trans] failed to "
"configure %s: %s\n", pkgver, strerror(rv));
goto out;
}
continue;
} else if (ttype == XBPS_TRANS_UPDATE) { } else if (ttype == XBPS_TRANS_UPDATE) {
/* /*
* Update a package: execute pre-remove action of * Update a package: execute pre-remove action of
@ -254,8 +242,7 @@ xbps_transaction_commit(struct xbps_handle *xhp)
while ((obj = xbps_object_iterator_next(iter)) != NULL) { while ((obj = xbps_object_iterator_next(iter)) != NULL) {
xbps_dictionary_get_cstring_nocopy(obj, "pkgver", &pkgver); xbps_dictionary_get_cstring_nocopy(obj, "pkgver", &pkgver);
ttype = xbps_transaction_pkg_type(obj); ttype = xbps_transaction_pkg_type(obj);
if (ttype == XBPS_TRANS_REMOVE || ttype == XBPS_TRANS_HOLD || if (ttype == XBPS_TRANS_REMOVE || ttype == XBPS_TRANS_HOLD) {
ttype == XBPS_TRANS_CONFIGURE) {
xbps_dbg_printf(xhp, "%s: skipping configuration for " xbps_dbg_printf(xhp, "%s: skipping configuration for "
"%s: %d\n", __func__, pkgver, ttype); "%s: %d\n", __func__, pkgver, ttype);
continue; continue;