Get rid of pkg state half-unpacked; not-installed state is good enough.
This commit is contained in:
parent
d6735d5685
commit
df0d5d7330
@ -56,7 +56,7 @@
|
|||||||
*/
|
*/
|
||||||
#define XBPS_PKGINDEX_VERSION "1.5"
|
#define XBPS_PKGINDEX_VERSION "1.5"
|
||||||
|
|
||||||
#define XBPS_API_VERSION "20121107-1"
|
#define XBPS_API_VERSION "20121111"
|
||||||
|
|
||||||
#ifndef XBPS_VERSION
|
#ifndef XBPS_VERSION
|
||||||
#define XBPS_VERSION "UNSET"
|
#define XBPS_VERSION "UNSET"
|
||||||
@ -1732,8 +1732,6 @@ int xbps_repository_sync_pkg_index(struct xbps_handle *xhp,
|
|||||||
* Integer representing a state on which a package may be. Possible
|
* Integer representing a state on which a package may be. Possible
|
||||||
* values for this are:
|
* values for this are:
|
||||||
*
|
*
|
||||||
* - XBPS_PKG_STATE_HALF_UNPACKED: Package was being unpacked
|
|
||||||
* but didn't finish properly.
|
|
||||||
* - XBPS_PKG_STATE_UNPACKED: Package has been unpacked correctly
|
* - XBPS_PKG_STATE_UNPACKED: Package has been unpacked correctly
|
||||||
* but has not been configured due to unknown reasons.
|
* but has not been configured due to unknown reasons.
|
||||||
* - XBPS_PKG_STATE_INSTALLED: Package has been installed successfully.
|
* - XBPS_PKG_STATE_INSTALLED: Package has been installed successfully.
|
||||||
@ -1750,7 +1748,6 @@ typedef enum pkg_state {
|
|||||||
XBPS_PKG_STATE_BROKEN,
|
XBPS_PKG_STATE_BROKEN,
|
||||||
XBPS_PKG_STATE_HALF_REMOVED,
|
XBPS_PKG_STATE_HALF_REMOVED,
|
||||||
XBPS_PKG_STATE_NOT_INSTALLED,
|
XBPS_PKG_STATE_NOT_INSTALLED,
|
||||||
XBPS_PKG_STATE_HALF_UNPACKED
|
|
||||||
} pkg_state_t;
|
} pkg_state_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
* will be executed.
|
* will be executed.
|
||||||
* -# Its requiredby objects will be removed from the installed packages
|
* -# Its requiredby objects will be removed from the installed packages
|
||||||
* database.
|
* 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
|
* -# Its <b>purge-remove</b> target specified in the REMOVE script
|
||||||
* will be executed.
|
* will be executed.
|
||||||
* -# Its package metadata directory will be removed.
|
* -# Its package metadata directory will be removed.
|
||||||
|
@ -42,7 +42,6 @@ static const struct state states[] = {
|
|||||||
{ "broken", XBPS_PKG_STATE_BROKEN },
|
{ "broken", XBPS_PKG_STATE_BROKEN },
|
||||||
{ "half-removed", XBPS_PKG_STATE_HALF_REMOVED },
|
{ "half-removed", XBPS_PKG_STATE_HALF_REMOVED },
|
||||||
{ "not-installed", XBPS_PKG_STATE_NOT_INSTALLED },
|
{ "not-installed", XBPS_PKG_STATE_NOT_INSTALLED },
|
||||||
{ "half-unpacked", XBPS_PKG_STATE_HALF_UNPACKED },
|
|
||||||
{ NULL, 0 }
|
{ NULL, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -710,18 +710,6 @@ xbps_unpack_binary_pkg(struct xbps_handle *xhp, prop_dictionary_t pkg_repod)
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
free(bpkg);
|
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.
|
* Extract archive files.
|
||||||
*/
|
*/
|
||||||
|
@ -174,8 +174,7 @@ transaction_find_pkg(struct xbps_handle *xhp,
|
|||||||
|
|
||||||
if (state == XBPS_PKG_STATE_UNPACKED)
|
if (state == XBPS_PKG_STATE_UNPACKED)
|
||||||
reason = "configure";
|
reason = "configure";
|
||||||
else if (state == XBPS_PKG_STATE_NOT_INSTALLED ||
|
else if (state == XBPS_PKG_STATE_NOT_INSTALLED)
|
||||||
state == XBPS_PKG_STATE_HALF_UNPACKED)
|
|
||||||
reason = "install";
|
reason = "install";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user