Get rid of pkg state half-unpacked; not-installed state is good enough.
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
* will be executed.
|
||||
* -# Its requiredby objects will be removed from the installed packages
|
||||
* database.
|
||||
* -# Its state will be changed to XBPS_PKG_STATE_HALF_UNPACKED.
|
||||
* -# Its state will be changed to XBPS_PKG_STATE_HALF_REMOVED.
|
||||
* -# Its <b>purge-remove</b> target specified in the REMOVE script
|
||||
* will be executed.
|
||||
* -# Its package metadata directory will be removed.
|
||||
|
||||
@@ -42,7 +42,6 @@ static const struct state states[] = {
|
||||
{ "broken", XBPS_PKG_STATE_BROKEN },
|
||||
{ "half-removed", XBPS_PKG_STATE_HALF_REMOVED },
|
||||
{ "not-installed", XBPS_PKG_STATE_NOT_INSTALLED },
|
||||
{ "half-unpacked", XBPS_PKG_STATE_HALF_UNPACKED },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
|
||||
@@ -710,18 +710,6 @@ xbps_unpack_binary_pkg(struct xbps_handle *xhp, prop_dictionary_t pkg_repod)
|
||||
return rv;
|
||||
}
|
||||
free(bpkg);
|
||||
|
||||
/*
|
||||
* Set package state to half-unpacked.
|
||||
*/
|
||||
if ((rv = xbps_set_pkg_state_installed(xhp, pkgname, version,
|
||||
XBPS_PKG_STATE_HALF_UNPACKED)) != 0) {
|
||||
xbps_set_cb_state(xhp, XBPS_STATE_UNPACK_FAIL,
|
||||
rv, pkgname, version,
|
||||
"%s: [unpack] failed to set state to half-unpacked: %s",
|
||||
pkgver, strerror(rv));
|
||||
goto out;
|
||||
}
|
||||
/*
|
||||
* Extract archive files.
|
||||
*/
|
||||
|
||||
@@ -174,8 +174,7 @@ transaction_find_pkg(struct xbps_handle *xhp,
|
||||
|
||||
if (state == XBPS_PKG_STATE_UNPACKED)
|
||||
reason = "configure";
|
||||
else if (state == XBPS_PKG_STATE_NOT_INSTALLED ||
|
||||
state == XBPS_PKG_STATE_HALF_UNPACKED)
|
||||
else if (state == XBPS_PKG_STATE_NOT_INSTALLED)
|
||||
reason = "install";
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user