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

@ -124,13 +124,11 @@ download_binpkgs(struct xbps_handle *xhp, prop_object_iterator_t iter)
/*
* Create cachedir.
*/
if (xbps_mkpath(prop_string_cstring_nocopy(xhp->cachedir),
0755) == -1) {
if (xbps_mkpath(xhp->cachedir, 0755) == -1) {
xbps_set_cb_state(XBPS_STATE_DOWNLOAD_FAIL,
errno, pkgname, version,
"%s: [trans] cannot create cachedir `%s': %s",
pkgver, prop_string_cstring_nocopy(xhp->cachedir),
strerror(errno));
pkgver, xhp->cachedir, strerror(errno));
free(binfile);
rv = errno;
break;
@ -142,8 +140,7 @@ download_binpkgs(struct xbps_handle *xhp, prop_object_iterator_t iter)
/*
* Fetch binary package.
*/
rv = xbps_fetch_file(binfile,
prop_string_cstring_nocopy(xhp->cachedir), false, NULL);
rv = xbps_fetch_file(binfile, xhp->cachedir, false, NULL);
if (rv == -1) {
xbps_set_cb_state(XBPS_STATE_DOWNLOAD_FAIL,
errno, pkgname, version,