summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_install/delete
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2003-08-01 08:56:02 +0000
committerMarc Espie <espie@cvs.openbsd.org>2003-08-01 08:56:02 +0000
commita128aa1f61a4bf02e15015067f9cc55a97cebd2b (patch)
treee6a0bbcc1034fb62cd4a53e300d4973b3ecea31c /usr.sbin/pkg_install/delete
parent8244b488c40c0b764fb4c91f9a94c61735260066 (diff)
Add -q flag to pkg_delete: don't check md5 before removing.
Useful for bulk-package builders who want to clean /usr/local quickly.
Diffstat (limited to 'usr.sbin/pkg_install/delete')
-rw-r--r--usr.sbin/pkg_install/delete/delete.h3
-rw-r--r--usr.sbin/pkg_install/delete/main.c13
-rw-r--r--usr.sbin/pkg_install/delete/perform.c6
-rw-r--r--usr.sbin/pkg_install/delete/pkg_delete.16
4 files changed, 18 insertions, 10 deletions
diff --git a/usr.sbin/pkg_install/delete/delete.h b/usr.sbin/pkg_install/delete/delete.h
index e952ad1b453..ff3f7f151ac 100644
--- a/usr.sbin/pkg_install/delete/delete.h
+++ b/usr.sbin/pkg_install/delete/delete.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: delete.h,v 1.1 1996/06/04 07:56:07 niklas Exp $ */
+/* $OpenBSD: delete.h,v 1.2 2003/08/01 08:56:01 espie Exp $ */
/*
* FreeBSD install - a package for the installation and maintainance
@@ -26,6 +26,7 @@
extern char *Prefix;
extern Boolean NoDeInstall;
extern Boolean CleanDirs;
+extern Boolean CheckMD5;
extern Boolean Force;
extern char *Directory;
extern char *PkgName;
diff --git a/usr.sbin/pkg_install/delete/main.c b/usr.sbin/pkg_install/delete/main.c
index 34c1b9973c7..e587f5f5069 100644
--- a/usr.sbin/pkg_install/delete/main.c
+++ b/usr.sbin/pkg_install/delete/main.c
@@ -1,8 +1,8 @@
-/* $OpenBSD: main.c,v 1.10 2003/07/04 17:31:19 avsm Exp $ */
+/* $OpenBSD: main.c,v 1.11 2003/08/01 08:56:01 espie Exp $ */
#include <sys/cdefs.h>
#ifndef lint
-static const char rcsid[] = "$OpenBSD: main.c,v 1.10 2003/07/04 17:31:19 avsm Exp $";
+static const char rcsid[] = "$OpenBSD: main.c,v 1.11 2003/08/01 08:56:01 espie Exp $";
#endif
/*
@@ -30,11 +30,12 @@ static const char rcsid[] = "$OpenBSD: main.c,v 1.10 2003/07/04 17:31:19 avsm Ex
#include "lib.h"
#include "delete.h"
-static char Options[] = "hvDdnfp:";
+static char Options[] = "hvDdnfp:q";
char *Prefix = NULL;
Boolean NoDeInstall = FALSE;
Boolean CleanDirs = FALSE;
+Boolean CheckMD5 = TRUE;
static void usage(void);
@@ -72,6 +73,10 @@ main(int argc, char **argv)
Verbose = TRUE;
break;
+ case 'q':
+ CheckMD5 = FALSE;
+ break;
+
case 'h':
case '?':
default:
@@ -105,6 +110,6 @@ main(int argc, char **argv)
static void
usage()
{
- fprintf(stderr, "usage: pkg_delete [-vDdnf] [-p prefix] pkg-name ...\n");
+ fprintf(stderr, "usage: pkg_delete [-vDdhnfq] [-p prefix] pkg-name ...\n");
exit(1);
}
diff --git a/usr.sbin/pkg_install/delete/perform.c b/usr.sbin/pkg_install/delete/perform.c
index 483f338d192..802e5c99ed3 100644
--- a/usr.sbin/pkg_install/delete/perform.c
+++ b/usr.sbin/pkg_install/delete/perform.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: perform.c,v 1.14 2003/07/04 17:31:19 avsm Exp $ */
+/* $OpenBSD: perform.c,v 1.15 2003/08/01 08:56:01 espie Exp $ */
#ifndef lint
-static const char rcsid[] = "$OpenBSD: perform.c,v 1.14 2003/07/04 17:31:19 avsm Exp $";
+static const char rcsid[] = "$OpenBSD: perform.c,v 1.15 2003/08/01 08:56:01 espie Exp $";
#endif
/*
@@ -221,7 +221,7 @@ try_again:
}
if (!Fake) {
/* Some packages aren't packed right, so we need to just ignore delete_package()'s status. Ugh! :-( */
- if (delete_package(FALSE, CleanDirs, &Plist) == FAIL)
+ if (delete_package(FALSE, CleanDirs, CheckMD5, &Plist) == FAIL)
pwarnx(
"couldn't entirely delete package (perhaps the packing list is\n"
"incorrectly specified?)");
diff --git a/usr.sbin/pkg_install/delete/pkg_delete.1 b/usr.sbin/pkg_install/delete/pkg_delete.1
index 80012de9afe..10582b52afa 100644
--- a/usr.sbin/pkg_install/delete/pkg_delete.1
+++ b/usr.sbin/pkg_install/delete/pkg_delete.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: pkg_delete.1,v 1.15 2003/03/07 06:30:38 david Exp $
+.\" $OpenBSD: pkg_delete.1,v 1.16 2003/08/01 08:56:01 espie Exp $
.\"
.\" FreeBSD install - a package for the installation and maintenance
.\" of non-core utilities.
@@ -25,7 +25,7 @@
.Nd a utility for deleting previously installed software package distributions
.Sh SYNOPSIS
.Nm pkg_delete
-.Op Fl vDdnf
+.Op Fl vDdnfq
.Op Fl p Ar prefix
.Ar pkg-name Op Ar ...
.Sh DESCRIPTION
@@ -77,6 +77,8 @@ the package.
.It Fl f
Force removal of the package, even if a dependency is recorded or the
deinstall or require script fails.
+.It Fl q
+Delete package quickly, do not bother checking md5s before removing files.
.El
.Sh TECHNICAL DETAILS
.Nm