#! /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>
#
$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');
}
$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
-.\" $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>
.\"
.\" 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
.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
.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
.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.
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