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

@@ -41,7 +41,7 @@ usage(bool fail)
"Usage: xbps-pkgdb [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"
" -h --help Print usage help\n"
" -m --mode <auto|manual|hold|unhold> Change PKGNAME to this mode\n"
@@ -92,7 +92,7 @@ main(int argc, char **argv)
{ NULL, 0, NULL, 0 }
};
struct xbps_handle xh;
const char *conffile = NULL, *rootdir = NULL, *instmode = NULL;
const char *confdir = NULL, *rootdir = NULL, *instmode = NULL;
int c, i, rv, flags = 0;
bool update_format = false, all = false;
@@ -102,7 +102,7 @@ main(int argc, char **argv)
all = true;
break;
case 'C':
conffile = optarg;
confdir = optarg;
break;
case 'd':
flags |= XBPS_FLAG_DEBUG;
@@ -136,9 +136,9 @@ main(int argc, char **argv)
memset(&xh, 0, sizeof(xh));
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;
if ((rv = xbps_init(&xh)) != 0) {

View File

@@ -1,4 +1,4 @@
.Dd September 30, 2014
.Dd November 5, 2014
.Dt XBPS-PKGDB 8
.Sh NAME
.Nm xbps-pkgdb
@@ -36,8 +36,10 @@ Updates the pkgdb format to the latest version.
.Bl -tag -width -x
.It Fl a, Fl -all
Process all registered packages, regardless of its state.
.It Fl C, Fl -config Ar file
Specifies a full path to the XBPS configuration file.
.It Fl C, Fl -config Ar dir
Specifies a path to the XBPS configuration directory.
If the first character is not '\/' then it's a relative path of
.Ar rootdir .
.It Fl d, Fl -debug
Enables extra debugging shown to stderr.
.It Fl h, Fl -help
@@ -67,8 +69,8 @@ Shows the XBPS version.
.El
.Sh FILES
.Bl -tag -width /var/db/xbps/.<pkgname>-files.plist
.It Ar /etc/xbps/xbps.conf
Default configuration file.
.It Ar /etc/xbps.d
Default configuration directory.
.It Ar /var/db/xbps/.<pkgname>-files.plist
Package files metadata.
.It Ar /var/db/xbps/pkgdb-0.38.plist