xbps-remove: renamed -i, --ignore-revdeps to -F --force-revdeps.

This commit is contained in:
Juan RP 2012-11-21 06:00:55 +01:00
parent 7669fcf34d
commit b39881e47a
2 changed files with 19 additions and 19 deletions

View File

@ -50,13 +50,12 @@ usage(bool fail)
" -C --config <file> Full path to configuration file\n"
" -c --cachedir <dir> Full path to cachedir\n"
" -d --debug Debug mode shown to stderr\n"
" -F --force-revdeps Force package removal even with revdeps\n"
" -f --force Force package files removal\n"
" -h --help Print help usage\n"
" -i --ignore-revdeps Ignore reverse deps\n"
" -n --dry-run Dry-run mode\n"
" -O --clean-cache Remove obsolete packages in cachedir\n"
" -o --remove-orphans Remove package orphans\n"
" -p --print-format <fmt> Print format for dry-run mode\n"
" -R --recursive Recursively remove dependencies\n"
" -r --rootdir <dir> Full path to rootdir\n"
" -v --verbose Verbose messages\n"
@ -129,7 +128,8 @@ state_cb_rm(struct xbps_handle *xhp,
break;
default:
xbps_dbg_printf(xhp,
"unknown state %d\n", xscd->state);
"%s-%s: unknown state %d\n",
xscd->arg0, xscd->arg1, xscd->state);
break;
}
}
@ -241,18 +241,17 @@ remove_pkg(struct xbps_handle *xhp, const char *pkgname, size_t cols,
int
main(int argc, char **argv)
{
const char *shortopts = "C:c:dfhinOop:Rr:vVy";
const char *shortopts = "C:c:dFfhnOoRr:vVy";
const struct option longopts[] = {
{ "config", required_argument, NULL, 'C' },
{ "cachedir", required_argument, NULL, 'c' },
{ "debug", no_argument, NULL, 'd' },
{ "force-revdeps", no_argument, NULL, 'F' },
{ "force", no_argument, NULL, 'f' },
{ "help", no_argument, NULL, 'h' },
{ "ignore-revdeps", no_argument, NULL, 'i' },
{ "dry-run", no_argument, NULL, 'n' },
{ "clean-cache", no_argument, NULL, 'O' },
{ "remove-orphans", no_argument, NULL, 'o' },
{ "print-format", required_argument, NULL, 'p' },
{ "recursive", no_argument, NULL, 'R' },
{ "rootdir", required_argument, NULL, 'r' },
{ "verbose", no_argument, NULL, 'v' },
@ -261,13 +260,13 @@ main(int argc, char **argv)
{ NULL, 0, NULL, 0 }
};
struct sigaction sa;
const char *rootdir, *cachedir, *conffile, *pformat;
const char *rootdir, *cachedir, *conffile;
int i, c, flags, rv;
bool yes, drun, recursive, ignore_revdeps, clean_cache;
bool orphans, reqby_force;
size_t maxcols;
rootdir = cachedir = conffile = pformat = NULL;
rootdir = cachedir = conffile = NULL;
flags = rv = 0;
drun = recursive = ignore_revdeps = clean_cache = false;
reqby_force = yes = orphans = false;
@ -283,15 +282,15 @@ main(int argc, char **argv)
case 'd':
flags |= XBPS_FLAG_DEBUG;
break;
case 'F':
ignore_revdeps = true;
break;
case 'f':
flags |= XBPS_FLAG_FORCE_REMOVE_FILES;
break;
case 'h':
usage(false);
/* NOTREACHED */
case 'i':
ignore_revdeps = true;
break;
case 'n':
drun = true;
break;
@ -301,9 +300,6 @@ main(int argc, char **argv)
case 'o':
orphans = true;
break;
case 'p':
pformat = optarg;
break;
case 'R':
recursive = true;
break;

View File

@ -1,4 +1,4 @@
.Dd November 6, 2012
.Dd November 21, 2012
.Os Void Linux
.Dt xbps-remove 8
.Sh NAME
@ -46,7 +46,7 @@ action on its
script.
.Pp
.Sy *
Package metadata files are removed.
Package metadata file is removed.
.Pp
.Sy *
Package is unregistered from package database.
@ -59,12 +59,12 @@ Specifies a full path to the XBPS configuration file.
Specifies a full path to the cache directory, where binary packages are stored.
.It Fl d, Fl -debug
Enables extra debugging shown to stderr.
.It Fl F, Fl -force-revdeps
Forcefully remove package even if there are reverse dependencies (DANGEROUS!).
.It Fl f, Fl -force
Forcefully remove package files even if they have been modified.
.It Fl h, Fl -help
Show the help usage.
.It Fl i, Fl -ignore-revdeps
Ignore reverse dependencies when removing packages.
.It Fl n, Fl -dry-run
Dry-run mode. Show what actions would be done but don't remove anything.
.It Fl O, Fl -clean-cache
@ -91,9 +91,13 @@ Assume yes to all questions and avoid interactive questions.
.It Fl V, Fl -version
Shows the XBPS version.
.Sh FILES
.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
.Bl -tag -width /var/db/xbps/.<pkgname>.plist
.It Ar /etc/xbps/xbps.conf
Default XBPS configuration file.
.It Ar /var/db/xbps/.<pkgname>.plist
Package metadata properties.
.It Ar /var/db/xbps/pkgdb.plist
XBPS package database.
.It Ar /var/cache/xbps
Default XBPS cache directory.
.Sh SEE ALSO