New "metadir" member in xbps_handle to override default metadata dir.

This commit is contained in:
Juan RP
2012-03-13 10:22:35 +01:00
parent 749e03aa29
commit 9bada162a1
8 changed files with 58 additions and 59 deletions

View File

@@ -1,5 +1,5 @@
/*-
* Copyright (c) 2010 Juan Romero Pardines.
* Copyright (c) 2010-2012 Juan Romero Pardines.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -87,7 +87,7 @@ find_files_in_packages(int npatterns, char **patterns)
unsigned int i, count;
xhp = xbps_handle_get();
path = xbps_xasprintf("%s/%s/metadata", xhp->rootdir, XBPS_META_PATH);
path = xbps_xasprintf("%s/metadata", xhp->metadir);
if (path == NULL)
return -1;

View File

@@ -371,8 +371,7 @@ main(int argc, char **argv)
}
} else if (strcasecmp(argv[0], "updatepkgdb") == 0) {
/* update regpkgdb to pkgdb */
plist = xbps_xasprintf("%s/%s/regpkgdb.plist",
xh.rootdir, XBPS_META_PATH);
plist = xbps_xasprintf("%s/regpkgdb.plist", xh.metadir);
if (plist == NULL) {
rv = ENOMEM;
goto out;