xbps-{bin,repo}: new -o flag for the 'show' target, to print specific objs value.
This commit is contained in:
@@ -90,13 +90,13 @@ main(int argc, char **argv)
|
||||
struct xbps_handle *xhp;
|
||||
struct xferstat xfer;
|
||||
prop_dictionary_t pkgd;
|
||||
const char *rootdir, *cachedir, *confdir;
|
||||
const char *rootdir, *cachedir, *confdir, *option;
|
||||
int c, rv = 0;
|
||||
bool debug = false;
|
||||
|
||||
rootdir = cachedir = confdir = NULL;
|
||||
rootdir = cachedir = confdir = option = NULL;
|
||||
|
||||
while ((c = getopt(argc, argv, "C:c:dr:V")) != -1) {
|
||||
while ((c = getopt(argc, argv, "C:c:do:r:V")) != -1) {
|
||||
switch (c) {
|
||||
case 'C':
|
||||
confdir = optarg;
|
||||
@@ -107,6 +107,9 @@ main(int argc, char **argv)
|
||||
case 'd':
|
||||
debug = true;
|
||||
break;
|
||||
case 'o':
|
||||
option = optarg;
|
||||
break;
|
||||
case 'r':
|
||||
/* To specify the root directory */
|
||||
rootdir = optarg;
|
||||
@@ -186,7 +189,7 @@ main(int argc, char **argv)
|
||||
if (argc != 2)
|
||||
usage(xhp);
|
||||
|
||||
rv = show_pkg_info_from_repolist(argv[1]);
|
||||
rv = show_pkg_info_from_repolist(argv[1], option);
|
||||
if (rv == ENOENT) {
|
||||
xbps_printf("Unable to locate package "
|
||||
"`%s' in repository pool.\n", argv[1]);
|
||||
|
||||
Reference in New Issue
Block a user