xbps-remove: renamed -i, --ignore-revdeps to -F --force-revdeps.
This commit is contained in:
parent
7669fcf34d
commit
b39881e47a
@ -50,13 +50,12 @@ usage(bool fail)
|
|||||||
" -C --config <file> Full path to configuration file\n"
|
" -C --config <file> Full path to configuration file\n"
|
||||||
" -c --cachedir <dir> Full path to cachedir\n"
|
" -c --cachedir <dir> Full path to cachedir\n"
|
||||||
" -d --debug Debug mode shown to stderr\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"
|
" -f --force Force package files removal\n"
|
||||||
" -h --help Print help usage\n"
|
" -h --help Print help usage\n"
|
||||||
" -i --ignore-revdeps Ignore reverse deps\n"
|
|
||||||
" -n --dry-run Dry-run mode\n"
|
" -n --dry-run Dry-run mode\n"
|
||||||
" -O --clean-cache Remove obsolete packages in cachedir\n"
|
" -O --clean-cache Remove obsolete packages in cachedir\n"
|
||||||
" -o --remove-orphans Remove package orphans\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 --recursive Recursively remove dependencies\n"
|
||||||
" -r --rootdir <dir> Full path to rootdir\n"
|
" -r --rootdir <dir> Full path to rootdir\n"
|
||||||
" -v --verbose Verbose messages\n"
|
" -v --verbose Verbose messages\n"
|
||||||
@ -129,7 +128,8 @@ state_cb_rm(struct xbps_handle *xhp,
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
xbps_dbg_printf(xhp,
|
xbps_dbg_printf(xhp,
|
||||||
"unknown state %d\n", xscd->state);
|
"%s-%s: unknown state %d\n",
|
||||||
|
xscd->arg0, xscd->arg1, xscd->state);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -241,18 +241,17 @@ remove_pkg(struct xbps_handle *xhp, const char *pkgname, size_t cols,
|
|||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
const char *shortopts = "C:c:dfhinOop:Rr:vVy";
|
const char *shortopts = "C:c:dFfhnOoRr:vVy";
|
||||||
const struct option longopts[] = {
|
const struct option longopts[] = {
|
||||||
{ "config", required_argument, NULL, 'C' },
|
{ "config", required_argument, NULL, 'C' },
|
||||||
{ "cachedir", required_argument, NULL, 'c' },
|
{ "cachedir", required_argument, NULL, 'c' },
|
||||||
{ "debug", no_argument, NULL, 'd' },
|
{ "debug", no_argument, NULL, 'd' },
|
||||||
|
{ "force-revdeps", no_argument, NULL, 'F' },
|
||||||
{ "force", no_argument, NULL, 'f' },
|
{ "force", no_argument, NULL, 'f' },
|
||||||
{ "help", no_argument, NULL, 'h' },
|
{ "help", no_argument, NULL, 'h' },
|
||||||
{ "ignore-revdeps", no_argument, NULL, 'i' },
|
|
||||||
{ "dry-run", no_argument, NULL, 'n' },
|
{ "dry-run", no_argument, NULL, 'n' },
|
||||||
{ "clean-cache", no_argument, NULL, 'O' },
|
{ "clean-cache", no_argument, NULL, 'O' },
|
||||||
{ "remove-orphans", no_argument, NULL, 'o' },
|
{ "remove-orphans", no_argument, NULL, 'o' },
|
||||||
{ "print-format", required_argument, NULL, 'p' },
|
|
||||||
{ "recursive", no_argument, NULL, 'R' },
|
{ "recursive", no_argument, NULL, 'R' },
|
||||||
{ "rootdir", required_argument, NULL, 'r' },
|
{ "rootdir", required_argument, NULL, 'r' },
|
||||||
{ "verbose", no_argument, NULL, 'v' },
|
{ "verbose", no_argument, NULL, 'v' },
|
||||||
@ -261,13 +260,13 @@ main(int argc, char **argv)
|
|||||||
{ NULL, 0, NULL, 0 }
|
{ NULL, 0, NULL, 0 }
|
||||||
};
|
};
|
||||||
struct sigaction sa;
|
struct sigaction sa;
|
||||||
const char *rootdir, *cachedir, *conffile, *pformat;
|
const char *rootdir, *cachedir, *conffile;
|
||||||
int i, c, flags, rv;
|
int i, c, flags, rv;
|
||||||
bool yes, drun, recursive, ignore_revdeps, clean_cache;
|
bool yes, drun, recursive, ignore_revdeps, clean_cache;
|
||||||
bool orphans, reqby_force;
|
bool orphans, reqby_force;
|
||||||
size_t maxcols;
|
size_t maxcols;
|
||||||
|
|
||||||
rootdir = cachedir = conffile = pformat = NULL;
|
rootdir = cachedir = conffile = NULL;
|
||||||
flags = rv = 0;
|
flags = rv = 0;
|
||||||
drun = recursive = ignore_revdeps = clean_cache = false;
|
drun = recursive = ignore_revdeps = clean_cache = false;
|
||||||
reqby_force = yes = orphans = false;
|
reqby_force = yes = orphans = false;
|
||||||
@ -283,15 +282,15 @@ main(int argc, char **argv)
|
|||||||
case 'd':
|
case 'd':
|
||||||
flags |= XBPS_FLAG_DEBUG;
|
flags |= XBPS_FLAG_DEBUG;
|
||||||
break;
|
break;
|
||||||
|
case 'F':
|
||||||
|
ignore_revdeps = true;
|
||||||
|
break;
|
||||||
case 'f':
|
case 'f':
|
||||||
flags |= XBPS_FLAG_FORCE_REMOVE_FILES;
|
flags |= XBPS_FLAG_FORCE_REMOVE_FILES;
|
||||||
break;
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
usage(false);
|
usage(false);
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
case 'i':
|
|
||||||
ignore_revdeps = true;
|
|
||||||
break;
|
|
||||||
case 'n':
|
case 'n':
|
||||||
drun = true;
|
drun = true;
|
||||||
break;
|
break;
|
||||||
@ -301,9 +300,6 @@ main(int argc, char **argv)
|
|||||||
case 'o':
|
case 'o':
|
||||||
orphans = true;
|
orphans = true;
|
||||||
break;
|
break;
|
||||||
case 'p':
|
|
||||||
pformat = optarg;
|
|
||||||
break;
|
|
||||||
case 'R':
|
case 'R':
|
||||||
recursive = true;
|
recursive = true;
|
||||||
break;
|
break;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.Dd November 6, 2012
|
.Dd November 21, 2012
|
||||||
.Os Void Linux
|
.Os Void Linux
|
||||||
.Dt xbps-remove 8
|
.Dt xbps-remove 8
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -46,7 +46,7 @@ action on its
|
|||||||
script.
|
script.
|
||||||
.Pp
|
.Pp
|
||||||
.Sy *
|
.Sy *
|
||||||
Package metadata files are removed.
|
Package metadata file is removed.
|
||||||
.Pp
|
.Pp
|
||||||
.Sy *
|
.Sy *
|
||||||
Package is unregistered from package database.
|
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.
|
Specifies a full path to the cache directory, where binary packages are stored.
|
||||||
.It Fl d, Fl -debug
|
.It Fl d, Fl -debug
|
||||||
Enables extra debugging shown to stderr.
|
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
|
.It Fl f, Fl -force
|
||||||
Forcefully remove package files even if they have been modified.
|
Forcefully remove package files even if they have been modified.
|
||||||
.It Fl h, Fl -help
|
.It Fl h, Fl -help
|
||||||
Show the help usage.
|
Show the help usage.
|
||||||
.It Fl i, Fl -ignore-revdeps
|
|
||||||
Ignore reverse dependencies when removing packages.
|
|
||||||
.It Fl n, Fl -dry-run
|
.It Fl n, Fl -dry-run
|
||||||
Dry-run mode. Show what actions would be done but don't remove anything.
|
Dry-run mode. Show what actions would be done but don't remove anything.
|
||||||
.It Fl O, Fl -clean-cache
|
.It Fl O, Fl -clean-cache
|
||||||
@ -91,9 +91,13 @@ Assume yes to all questions and avoid interactive questions.
|
|||||||
.It Fl V, Fl -version
|
.It Fl V, Fl -version
|
||||||
Shows the XBPS version.
|
Shows the XBPS version.
|
||||||
.Sh FILES
|
.Sh FILES
|
||||||
.Bl -tag -width xxxxxxxxxxxxxxxxxxxx
|
.Bl -tag -width /var/db/xbps/.<pkgname>.plist
|
||||||
.It Ar /etc/xbps/xbps.conf
|
.It Ar /etc/xbps/xbps.conf
|
||||||
Default XBPS configuration file.
|
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
|
.It Ar /var/cache/xbps
|
||||||
Default XBPS cache directory.
|
Default XBPS cache directory.
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
|
Loading…
Reference in New Issue
Block a user