Make the "-f" switch to pkg_delete(1) into a counter. Require two "-f"
switches to delete a package that has been preserved. Document this change.
This commit is contained in:
parent
e61a0cb520
commit
706a03ef9c
|
@ -1,11 +1,11 @@
|
||||||
/* $NetBSD: main.c,v 1.25 2003/06/05 13:15:44 agc Exp $ */
|
/* $NetBSD: main.c,v 1.26 2003/06/12 13:50:38 agc Exp $ */
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
#if 0
|
#if 0
|
||||||
static char *rcsid = "from FreeBSD Id: main.c,v 1.11 1997/10/08 07:46:48 charnier Exp";
|
static char *rcsid = "from FreeBSD Id: main.c,v 1.11 1997/10/08 07:46:48 charnier Exp";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: main.c,v 1.25 2003/06/05 13:15:44 agc Exp $");
|
__RCSID("$NetBSD: main.c,v 1.26 2003/06/12 13:50:38 agc Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ main(int argc, char **argv)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'f':
|
case 'f':
|
||||||
Force = TRUE;
|
Force += 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'F':
|
case 'F':
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
/* $NetBSD: perform.c,v 1.40 2003/01/10 11:55:45 agc Exp $ */
|
/* $NetBSD: perform.c,v 1.41 2003/06/12 13:50:38 agc Exp $ */
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
#if 0
|
#if 0
|
||||||
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.15 1997/10/13 15:03:52 jkh Exp";
|
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.15 1997/10/13 15:03:52 jkh Exp";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: perform.c,v 1.40 2003/01/10 11:55:45 agc Exp $");
|
__RCSID("$NetBSD: perform.c,v 1.41 2003/06/12 13:50:38 agc Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -233,7 +233,7 @@ require_delete(char *home, int tryall)
|
||||||
Prefix ? "-p" : "",
|
Prefix ? "-p" : "",
|
||||||
Prefix ? Prefix : "",
|
Prefix ? Prefix : "",
|
||||||
Verbose ? "-v" : "",
|
Verbose ? "-v" : "",
|
||||||
Force ? "-f" : "",
|
(Force > 1) ? "-f -f" : (Force == 1) ? "-f" : "",
|
||||||
NoDeInstall ? "-D" : "",
|
NoDeInstall ? "-D" : "",
|
||||||
CleanDirs ? "-d" : "",
|
CleanDirs ? "-d" : "",
|
||||||
Fake ? "-n" : "",
|
Fake ? "-n" : "",
|
||||||
|
@ -550,7 +550,7 @@ pkg_do(char *pkg)
|
||||||
}
|
}
|
||||||
if (fexists(PRESERVE_FNAME)) {
|
if (fexists(PRESERVE_FNAME)) {
|
||||||
printf("Package `%s' is marked as not for deletion\n", pkg);
|
printf("Package `%s' is marked as not for deletion\n", pkg);
|
||||||
if (!Force) {
|
if (Force <= 1) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.\" $NetBSD: pkg_delete.1,v 1.27 2003/01/10 11:55:46 agc Exp $
|
.\" $NetBSD: pkg_delete.1,v 1.28 2003/06/12 13:50:38 agc Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" FreeBSD install - a package for the installation and maintenance
|
.\" FreeBSD install - a package for the installation and maintenance
|
||||||
.\" of non-core utilities.
|
.\" of non-core utilities.
|
||||||
|
@ -151,7 +151,7 @@ option is given).
|
||||||
If a package has been marked as a
|
If a package has been marked as a
|
||||||
.Cm preserved
|
.Cm preserved
|
||||||
package, it will not be able to be deleted
|
package, it will not be able to be deleted
|
||||||
(unless the
|
(unless more than one occurrences of the
|
||||||
.Fl f
|
.Fl f
|
||||||
option is given).
|
option is given).
|
||||||
.Pp
|
.Pp
|
||||||
|
|
Loading…
Reference in New Issue