New configuration file via confuse: xbps.conf.

This commit is contained in:
Juan RP
2011-12-15 11:19:20 +01:00
parent 3f45f563be
commit b0ceeaa58e
39 changed files with 336 additions and 544 deletions

View File

@@ -188,16 +188,15 @@ xbps_purge_pkg(const char *pkgname, bool check_state)
/*
* Execute the purge action in REMOVE script (if found).
*/
if (chdir(prop_string_cstring_nocopy(xhp->rootdir)) == -1) {
if (chdir(xhp->rootdir) == -1) {
rv = errno;
xbps_set_cb_state(XBPS_STATE_PURGE_FAIL,
rv, pkgname, version,
"%s: [purge] failed to chdir to rootdir `%s': %s",
pkgver, prop_string_cstring_nocopy(xhp->rootdir),
strerror(rv));
pkgver, xhp->rootdir, strerror(rv));
return rv;
}
buf = xbps_xasprintf(".%s/metadata/%s/REMOVE", XBPS_META_PATH, pkgname);
buf = xbps_xasprintf("%s/metadata/%s/REMOVE", XBPS_META_PATH, pkgname);
if (buf == NULL) {
rv = ENOMEM;
return rv;
@@ -221,7 +220,7 @@ xbps_purge_pkg(const char *pkgname, bool check_state)
* Remove metadata dir and unregister package.
*/
if ((rv = remove_pkg_metadata(pkgname, version, pkgver,
prop_string_cstring_nocopy(xhp->rootdir))) != 0) {
xhp->rootdir)) != 0) {
xbps_set_cb_state(XBPS_STATE_PURGE_FAIL,
rv, pkgname, version,
"%s: [purge] failed to remove metadata files: %s",