summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install/delete/main.c
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2001-09-19 08:06:48 +0000
committersobomax <sobomax@FreeBSD.org>2001-09-19 08:06:48 +0000
commit7942a4e1d2c7f9c821cae968af1b156019372d2a (patch)
tree983c446512bc26a2723c915739303dcac0da1570 /usr.sbin/pkg_install/delete/main.c
parentde49b782662799d33adbe3450f5c4cbdb697a7f0 (diff)
downloadFreeBSD-src-7942a4e1d2c7f9c821cae968af1b156019372d2a.zip
FreeBSD-src-7942a4e1d2c7f9c821cae968af1b156019372d2a.tar.gz
Various fixes and improvements:
- fix harmless compiler's warnings (unused variables and missed prototype); - before refusing to delete package because "there are packages installed that require this package" check that packages in question is actually installed; - add new `-r' option to pkg_delete(8), which instructs it to delete not only packages specified at command line, but all packages that depend on specified packages as well. MFC after: 2 weeks
Diffstat (limited to 'usr.sbin/pkg_install/delete/main.c')
-rw-r--r--usr.sbin/pkg_install/delete/main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/pkg_install/delete/main.c b/usr.sbin/pkg_install/delete/main.c
index 2dba240..5538838e 100644
--- a/usr.sbin/pkg_install/delete/main.c
+++ b/usr.sbin/pkg_install/delete/main.c
@@ -30,12 +30,13 @@ static const char rcsid[] =
#include "lib.h"
#include "delete.h"
-static char Options[] = "adDfGhinp:vx";
+static char Options[] = "adDfGhinp:rvx";
char *Prefix = NULL;
Boolean CleanDirs = FALSE;
Boolean Interactive = FALSE;
Boolean NoDeInstall = FALSE;
+Boolean Recursive = FALSE;
match_t MatchType = MATCH_GLOB;
static void usage __P((void));
@@ -93,6 +94,10 @@ main(int argc, char **argv)
Interactive = TRUE;
break;
+ case 'r':
+ Recursive = TRUE;
+ break;
+
case 'h':
case '?':
default:
@@ -148,7 +153,7 @@ static void
usage()
{
fprintf(stderr, "%s\n%s\n",
- "usage: pkg_delete [-dDfGinvx] [-p prefix] pkg-name ...",
+ "usage: pkg_delete [-dDfGinrvx] [-p prefix] pkg-name ...",
" pkg_delete -a [flags]");
exit(1);
}
OpenPOWER on IntegriCloud