summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/ArcCheck.pm13
1 files changed, 12 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm b/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm
index 631ad74403a..5e49e349075 100644
--- a/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm
+++ b/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: ArcCheck.pm,v 1.26 2014/08/10 10:01:03 espie Exp $
+# $OpenBSD: ArcCheck.pm,v 1.27 2014/09/01 10:41:55 espie Exp $
#
# Copyright (c) 2005-2006 Marc Espie <espie@openbsd.org>
#
@@ -82,6 +82,17 @@ sub verify_modes
$result = 0;
}
}
+ if ($o->isFile) {
+ if (!defined $item->{size}) {
+ $o->errsay("Error: file #1 does not have recorded size",
+ $item->fullname);
+ $result = 0;
+ } elsif ($item->{size} != $o->{size}) {
+ $o->errsay("Error: size does not match for #1",
+ $item->fullname);
+ $result = 0;
+ }
+ }
return $result;
}