Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Merge pull request #1501 from evilgjb/master
Baptiste Daroussin committed 9 years ago
commit 7a0e7e09c548b794c182cf427a811097ea6af876
parent e582d43
3 files changed +22 -2
modified docs/pkg-query.8
@@ -14,7 +14,7 @@
.\"
.\"     @(#)pkg.8
.\"
-
.Dd March 7, 2016
+
.Dd November 18, 2016
.Dt PKG-QUERY 8
.Os
.Sh NAME
@@ -109,6 +109,11 @@ Comment of the matched package
Description of the matched package
.It Cm \&%w
Home page of the matched package
+
.It Cm \&%V
+
Returns 0 if the package is not marked as
+
.Qq vital ,
+
and 1 is the package is marked
+
.Qq vital .
.It Cm \&%l
License logic of the matched package - nothing for single, & for AND, and | for OR
.It Cm \&%s Ns Op bh
modified docs/pkg-set.8
@@ -14,7 +14,7 @@
.\"
.\"     @(#)pkg.8
.\"
-
.Dd February 4, 2015
+
.Dd November 18, 2016
.Dt PKG-SET 8
.Os
.Sh NAME
@@ -26,6 +26,7 @@
.Op Fl A Op Ar 01
.Op Fl n Ar oldname:newname
.Op Fl o Ar oldorigin:neworigin
+
.Op Fl v Op Ar 01
.Op Fl y
.Op Fl Cgix
.Ar pkg-name
@@ -36,6 +37,7 @@
.Op Cm --change-name Ar oldname:newname
.Op Cm --change-origin Ar oldorigin:neworigin
.Op Cm --yes
+
.Op Fl v Op Ar 01
.Op Cm --{case-sensitive,glob,case-insensitive,regex}
.Ar pkg-name
.Sh DESCRIPTION
@@ -97,6 +99,17 @@ Match
.Ar pkg-name
as a regular expression according to the "modern" or "extended" syntax of
.Xr re_format 7 .
+
.It Fl v Ar 01
+
Set or unset the
+
.Qq vital
+
flag on the target package(s).
+
Set to
+
.Ar 0
+
to disable the
+
.Qq vital
+
flag, and
+
.Ar 1
+
to enable it.
.It Fl y , Cm --yes
Assume yes rather than asking for confirmation before package autoremoval.
.El
modified libpkg/pkg_jobs.c
@@ -2006,6 +2006,8 @@ pkg_jobs_execute(struct pkg_jobs *j)
			p = ps->items[0]->pkg;
			if (ps->type == PKG_SOLVED_DELETE && p->vital && ((flags & PKG_DELETE_FORCE) == 0)) {
				pkg_emit_error("Cannot delete vital pkg: %s!", p->name);
+
				pkg_emit_error("If you are sure you want to remove %s, ", p->name);
+
				pkg_emit_error("unset the 'vital' flag with: pkg set -v 0 %s", p->name);
				retcode = EPKG_FATAL;
				goto cleanup;
			}