summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2011-06-27 12:13:57 +0000
committerMarc Espie <espie@cvs.openbsd.org>2011-06-27 12:13:57 +0000
commit06530f7b306b39d0e27f867fcfd4cf7622ff25e3 (patch)
tree23c41e5aca513dc3692e66d0fa1ef8d408fe8b96 /usr.sbin
parent85354abb26a0982d90c9d5515a4217b09c5dc13e (diff)
compute checksum in plist's existing checksum class, so that very old
md5 can be checked. would credit whoever reported this (oga?) except I don't remember.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgCheck.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgCheck.pm b/usr.sbin/pkg_add/OpenBSD/PkgCheck.pm
index eface7321fe..0691d24e8a8 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.28 2010/12/29 13:03:05 espie Exp $
+# $OpenBSD: PkgCheck.pm,v 1.29 2011/06/27 12:13:56 espie Exp $
#
# Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org>
#
@@ -100,7 +100,11 @@ sub thorough_check
$state->log("can't read #1", $name);
return;
}
- my $d = $self->compute_digest($name);
+ if (!defined $self->{d}) {
+ $state->log("no checksum for #1", $name);
+ return;
+ }
+ my $d = $self->compute_digest($name, ref($self->{d}));
if (!$d->equals($self->{d})) {
$state->log("checksum for #1 does not match", $name);
}