diff --git a/include/xbps_api.h b/include/xbps_api.h index 74b5d9ea..a1ceff2f 100644 --- a/include/xbps_api.h +++ b/include/xbps_api.h @@ -55,7 +55,7 @@ */ #define XBPS_PKGINDEX_VERSION "1.2" -#define XBPS_API_VERSION "20111020" +#define XBPS_API_VERSION "20111020-1" #define XBPS_VERSION "0.10.0" /** diff --git a/lib/package_configure.c b/lib/package_configure.c index 6e39d48b..4fc3afb5 100644 --- a/lib/package_configure.c +++ b/lib/package_configure.c @@ -91,8 +91,17 @@ xbps_configure_pkg(const char *pkgname, if (check_state) { rv = xbps_pkg_state_installed(pkgname, &state); - if (rv != 0) + if (rv == ENOENT) { + /* + * package not installed or has been removed + * (must be purged) so ignore it. + */ + return 0; + } else if (rv != 0) { + xbps_dbg_printf("%s: [configure] failed to get " + "pkg state: %s\n", pkgname, strerror(rv)); return EINVAL; + } if (state == XBPS_PKG_STATE_INSTALLED) { if ((xhp->flags & XBPS_FLAG_FORCE) == 0)