New configuration scheme changes, round 1.
- Configuration file 'xbps-conf.plist' has been splitted off into two files: conf.plist and repositories.plist. By default they are stored in etc/xbps. - Changed some members in xbps_handle struct, mostly to make it easy to change its value in {cache,root}dir and conffile. - Made xbps_init() release proplib objects as soon as we don't need them, that way it uses 35% less of memory or in some cases even more. There will be another commit that will implement to read new virtualpkg settings by the user, as specified in: http://code.google.com/p/xbps/issues/detail?id=12
This commit is contained in:
@ -137,9 +137,12 @@ download_binpkgs(struct xbps_handle *xhp, prop_object_iterator_t iter)
|
||||
/*
|
||||
* Create cachedir.
|
||||
*/
|
||||
if (xbps_mkpath(xhp->cachedir, 0755) == -1) {
|
||||
if (xbps_mkpath(prop_string_cstring_nocopy(xhp->cachedir),
|
||||
0755) == -1) {
|
||||
xbps_error_printf("xbps-bin: cannot mkdir cachedir "
|
||||
"`%s': %s.\n", xhp->cachedir, strerror(errno));
|
||||
"`%s': %s.\n",
|
||||
prop_string_cstring_nocopy(xhp->cachedir),
|
||||
strerror(errno));
|
||||
free(binfile);
|
||||
rv = errno;
|
||||
break;
|
||||
@ -149,7 +152,8 @@ download_binpkgs(struct xbps_handle *xhp, prop_object_iterator_t iter)
|
||||
/*
|
||||
* Fetch binary package.
|
||||
*/
|
||||
rv = xbps_fetch_file(binfile, xhp->cachedir, false, NULL);
|
||||
rv = xbps_fetch_file(binfile,
|
||||
prop_string_cstring_nocopy(xhp->cachedir), false, NULL);
|
||||
if (rv == -1) {
|
||||
RUN_TRANS_ERR_CB(XBPS_TRANS_STATE_DOWNLOAD, pkgver, errno);
|
||||
free(binfile);
|
||||
|
Reference in New Issue
Block a user