Replaced config/system {repo,preserve,virtualpkg}.d with a single directory.

See the NEWS file for more information.
This commit is contained in:
Juan RP
2014-11-06 09:58:04 +01:00
parent 578c3add0c
commit 5b522109f7
38 changed files with 278 additions and 277 deletions

View File

@ -40,7 +40,7 @@ usage(bool fail)
"Usage: xbps-reconfigure [OPTIONS] [PKGNAME...]\n\n"
"OPTIONS\n"
" -a --all Process all packages\n"
" -C --config <file> Full path to configuration file\n"
" -C --config <dir> Path to confdir (xbps.d)\n"
" -d --debug Debug mode shown to stderr\n"
" -f --force Force reconfiguration\n"
" -h --help Print usage help\n"
@ -104,7 +104,7 @@ main(int argc, char **argv)
{ NULL, 0, NULL, 0 }
};
struct xbps_handle xh;
const char *conffile = NULL, *rootdir = NULL;
const char *confdir = NULL, *rootdir = NULL;
int c, i, rv, flags = 0;
bool all = false;
@ -114,7 +114,7 @@ main(int argc, char **argv)
all = true;
break;
case 'C':
conffile = optarg;
confdir = optarg;
break;
case 'd':
flags |= XBPS_FLAG_DEBUG;
@ -146,9 +146,9 @@ main(int argc, char **argv)
memset(&xh, 0, sizeof(xh));
xh.state_cb = state_cb;
if (rootdir)
strncpy(xh.rootdir, rootdir, sizeof(xh.rootdir));
if (conffile)
strncpy(xh.conffile, conffile, sizeof(xh.conffile));
xbps_strlcpy(xh.rootdir, rootdir, sizeof(xh.rootdir));
if (confdir)
xbps_strlcpy(xh.confdir, confdir, sizeof(xh.confdir));
xh.flags = flags;