From 40c3e048b0e9f34a29b9dce40824cb5501ea3f8e Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 6 Nov 2014 10:54:52 +0100 Subject: [PATCH] xbps-rindex: added -d/--debug option. --- NEWS | 2 ++ bin/xbps-rindex/main.c | 7 ++++++- bin/xbps-rindex/xbps-rindex.8 | 6 ++++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 96837e73..3217db71 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,7 @@ xbps-0.42 (???): + * xbps-rindex(8): added -d/--debug option. + * utils: the -C/--config option now expects a path to a directory storing configuration files; if first character is not '/' it will be treated as relative to rootdir. diff --git a/bin/xbps-rindex/main.c b/bin/xbps-rindex/main.c index 19c4a320..7e8974c5 100644 --- a/bin/xbps-rindex/main.c +++ b/bin/xbps-rindex/main.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012-2013 Juan Romero Pardines. + * Copyright (c) 2012-2014 Juan Romero Pardines. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,6 +37,7 @@ usage(bool fail) fprintf(stdout, "Usage: xbps-rindex [OPTIONS] MODE ARGUMENTS\n\n" "OPTIONS\n" + " -d --debug Debug mode shown to stderr\n" " -f --force Force mode to overwrite entry in add mode\n" " -h --help Show help usage\n" " -v --verbose Verbose messages\n" @@ -58,6 +59,7 @@ main(int argc, char **argv) struct option longopts[] = { { "add", no_argument, NULL, 'a' }, { "clean", no_argument, NULL, 'c' }, + { "debug", no_argument, NULL, 'd' }, { "force", no_argument, NULL, 'f' }, { "help", no_argument, NULL, 'h' }, { "remove-obsoletes", no_argument, NULL, 'r' }, @@ -89,6 +91,9 @@ main(int argc, char **argv) case 'c': clean_mode = true; break; + case 'd': + flags |= XBPS_FLAG_DEBUG; + break; case 'f': force = true; break; diff --git a/bin/xbps-rindex/xbps-rindex.8 b/bin/xbps-rindex/xbps-rindex.8 index a18280e6..2c7becf8 100644 --- a/bin/xbps-rindex/xbps-rindex.8 +++ b/bin/xbps-rindex/xbps-rindex.8 @@ -1,4 +1,4 @@ -.Dd September 30, 2014 +.Dd November 6, 2014 .Dt XBPS-RINDEX 8 .Sh NAME .Nm xbps-rindex @@ -14,7 +14,9 @@ The utility creates, updates and removes obsolete binary packages stored in local repositories. .Sh OPTIONS -.Bl -tag -width -x +.Bl -tag -width November 6-x +.It Fl d, Fl -debug +Enables extra debugging shown to stderr. .It Fl f -force Forcefully register binary package into the local repository, overwriting existing entry. This flag is only useful with the