xbps_configure_pkg: improve error messages.
This commit is contained in:
parent
8e0612bb46
commit
4511e581b2
2
NEWS
2
NEWS
@ -26,7 +26,7 @@ xbps-0.14 (2012-02-28):
|
||||
* Fixed 'xbps-bin reconfigure all' (regression added in 0.13).
|
||||
|
||||
* While resolving dependencies check if required dependency is matched
|
||||
any virtual package already added in transaction, on match use it.
|
||||
with any virtual package already added in transaction, on match use it.
|
||||
|
||||
* Only accept binary packages compressed in gzip, bzip2 and xz formats.
|
||||
Profiling tests showed that libarchive wasted a considerable amount of
|
||||
|
@ -91,7 +91,7 @@ xbps_configure_pkg(const char *pkgname,
|
||||
|
||||
if (check_state) {
|
||||
rv = xbps_pkg_state_installed(pkgname, &state);
|
||||
xbps_dbg_printf("%s-%s: state %d\n", pkgname, version, state);
|
||||
xbps_dbg_printf("%s: state %d rv %d\n", pkgname, state, rv);
|
||||
if (rv == ENOENT) {
|
||||
/*
|
||||
* package not installed or has been removed.
|
||||
@ -153,6 +153,10 @@ xbps_configure_pkg(const char *pkgname,
|
||||
}
|
||||
} else {
|
||||
if (errno != ENOENT) {
|
||||
xbps_set_cb_state(XBPS_STATE_CONFIGURE_FAIL, errno,
|
||||
pkgname, lver,
|
||||
"%s: [configure] INSTALL script cannot be "
|
||||
"executed: %s", pkgver, strerror(errno));
|
||||
free(buf);
|
||||
free(pkgver);
|
||||
return errno;
|
||||
@ -168,8 +172,13 @@ xbps_configure_pkg(const char *pkgname,
|
||||
pkgver, strerror(rv));
|
||||
}
|
||||
free(pkgver);
|
||||
if (flush)
|
||||
rv = xbps_pkgdb_update(true);
|
||||
|
||||
if (flush) {
|
||||
if ((rv = xbps_pkgdb_update(true)) != 0) {
|
||||
xbps_set_cb_state(XBPS_STATE_CONFIGURE_FAIL, rv,
|
||||
pkgname, lver,
|
||||
"%s: [configure] failed to update pkgdb: %s\n",
|
||||
pkgver, strerror(rv));
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user