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:
Juan RP
2011-10-17 12:37:15 +02:00
parent b6da7393c1
commit 5642ffa86e
27 changed files with 236 additions and 207 deletions

View File

@ -155,7 +155,8 @@ check_pkg_integrity(const char *pkgname)
"empty target object!\n", pkgname, file);
continue;
}
path = xbps_xasprintf("%s/%s", xhp->rootdir, file);
path = xbps_xasprintf("%s/%s",
prop_string_cstring_nocopy(xhp->rootdir), file);
if (path == NULL)
abort();
@ -168,8 +169,9 @@ check_pkg_integrity(const char *pkgname)
}
free(path);
if (strcmp(xhp->rootdir, "/") && strstr(buf, xhp->rootdir))
path = buf + strlen(xhp->rootdir);
if (!prop_string_equals_cstring(xhp->rootdir, "/") &&
strstr(buf, prop_string_cstring_nocopy(xhp->rootdir)))
path = buf + prop_string_size(xhp->rootdir);
else
path = buf;
@ -201,7 +203,8 @@ check_pkg_integrity(const char *pkgname)
while ((obj = prop_object_iterator_next(iter))) {
prop_dictionary_get_cstring_nocopy(obj, "file", &file);
path = xbps_xasprintf("%s/%s", xhp->rootdir, file);
path = xbps_xasprintf("%s/%s",
prop_string_cstring_nocopy(xhp->rootdir), file);
if (path == NULL) {
prop_object_iterator_release(iter);
abort();
@ -250,7 +253,8 @@ check_pkg_integrity(const char *pkgname)
while ((obj = prop_object_iterator_next(iter))) {
prop_dictionary_get_cstring_nocopy(obj, "file", &file);
path = xbps_xasprintf("%s/%s", xhp->rootdir, file);
path = xbps_xasprintf("%s/%s",
prop_string_cstring_nocopy(xhp->rootdir), file);
if (path == NULL) {
prop_object_iterator_release(iter);
abort();