summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2016-08-25 14:58:43 +0000
committerespie <espie@openbsd.org>2016-08-25 14:58:43 +0000
commit8cd3e493b2379293d61b04f8d6eb5c485b3942d4 (patch)
treed02079980d5f7091d3ef5472f01b5e699b101216
parentAmend after clean-up of fortran.port.mk (diff)
downloadwireguard-openbsd-8cd3e493b2379293d61b04f8d6eb5c485b3942d4.tar.xz
wireguard-openbsd-8cd3e493b2379293d61b04f8d6eb5c485b3942d4.zip
make the full filesystem check optional, by popular demand.
doubling -q removes the plist thorough check.
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgCheck.pm19
-rw-r--r--usr.sbin/pkg_add/pkg_check.813
2 files changed, 21 insertions, 11 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgCheck.pm b/usr.sbin/pkg_add/OpenBSD/PkgCheck.pm
index 27782aa7b24..437fde7b486 100644
--- a/usr.sbin/pkg_add/OpenBSD/PkgCheck.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PkgCheck.pm
@@ -1,7 +1,7 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: PkgCheck.pm,v 1.59 2016/06/15 15:40:13 espie Exp $
+# $OpenBSD: PkgCheck.pm,v 1.60 2016/08/25 14:58:43 espie Exp $
#
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
#
@@ -309,10 +309,11 @@ sub handle_options
$self->{no_exports} = 1;
$self->add_interactive_options;
- $self->SUPER::handle_options('fB:q',
- '[-fIimnqvx] [-B pkg-destdir] [-D value]');
+ $self->SUPER::handle_options('fFB:q',
+ '[-fFIimnqvx] [-B pkg-destdir] [-D value]');
$self->{force} = $self->opt('f');
$self->{quick} = $self->opt('q');
+ $self->{filesystem} = $self->opt('F');
if (defined $self->opt('B')) {
$self->{destdir} = $self->opt('B');
}
@@ -908,10 +909,14 @@ sub run
$state->log->dump;
$self->reverse_dependencies_check($state, \@list);
$state->log->dump;
- $self->package_files_check($state, \@list);
- $state->log->dump;
- $self->filesystem_check($state);
- $state->progress->next;
+ if ($state->{quick} < 2) {
+ $self->package_files_check($state, \@list);
+ $state->log->dump;
+ }
+ if ($state->{filesystem}) {
+ $self->filesystem_check($state);
+ $state->progress->next;
+ }
}
sub parse_and_run
diff --git a/usr.sbin/pkg_add/pkg_check.8 b/usr.sbin/pkg_add/pkg_check.8
index ec0445d9d7e..be23d0c0fa3 100644
--- a/usr.sbin/pkg_add/pkg_check.8
+++ b/usr.sbin/pkg_add/pkg_check.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: pkg_check.8,v 1.6 2014/02/11 08:58:34 sthen Exp $
+.\" $OpenBSD: pkg_check.8,v 1.7 2016/08/25 14:58:43 espie Exp $
.\"
.\" Copyright (c) 2010 Marc Espie <espie@openbsd.org>
.\"
@@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: February 11 2014 $
+.Dd $Mdocdate: August 25 2016 $
.Dt PKG_CHECK 8
.Os
.Sh NAME
@@ -23,7 +23,7 @@
.Sh SYNOPSIS
.Nm pkg_check
.Bk -words
-.Op Fl fIimnqvx
+.Op Fl fFIimnqvx
.Op Fl D Ar name Ns Op = Ns Ar value
.Ek
.Sh DESCRIPTION
@@ -59,7 +59,7 @@ Checks that all direct dependencies have corresponding reverse dependencies.
.It Files from packages
Checks that each file, link or directory in those packing-lists actually exist,
and that their checksum matches what's recorded in the packing-list.
-.It Other files
+.It Other files Po option Fl F Pc
Checks that there are no other random objects under
.Pa /usr/local .
.El
@@ -87,6 +87,8 @@ do not check digital signatures.
.El
.It Fl f
Force the removal of bogus package information.
+.It Fl F
+Check the filesystem for random objects.
.It Fl I
Force non-interactive mode.
Default is to be interactive when run from a tty.
@@ -100,6 +102,9 @@ to always display the progress meter in cases it would not do so by default.
Don't actually modify packages, just perform checks.
.It Fl q
Don't verify checksums for files, just check for their existence.
+Doubling
+.Fl q
+will bypass that check entirely.
.It Fl v
Turn on verbose output.
Several