New configuration file via confuse: xbps.conf.

This commit is contained in:
Juan RP
2011-12-15 11:19:20 +01:00
parent 3f45f563be
commit b0ceeaa58e
39 changed files with 336 additions and 544 deletions

View File

@ -446,7 +446,7 @@ main(int argc, char **argv)
FILE *f = NULL;
char *outfile = NULL;
const char *conf_file = NULL, *rootdir = NULL;
int c;
int c, rv;
bool revdeps = false;
while ((c = getopt(argc, argv, "c:gRr:o:")) != -1) {
@ -487,10 +487,9 @@ main(int argc, char **argv)
xhp = xbps_handle_alloc();
if (xhp == NULL)
die("failed to allocate resources");
if (rootdir)
xhp->rootdir = prop_string_create_cstring(rootdir);
if (xbps_init(xhp))
die("failed to initialize libxbps");
xhp->rootdir = rootdir;
if ((rv = xbps_init(xhp)) != 0)
die("failed to initialize libxbps: %s", strerror(rv));
/*
* Output file will be <pkgname>.dot if not specified.