diff options
author | 2012-12-31 09:42:05 +0000 | |
---|---|---|
committer | 2012-12-31 09:42:05 +0000 | |
commit | 8e9543914d1309aea7e90f3ccafc1abc4617df8f (patch) | |
tree | 9dff182a9e2e971d14620b508ded6cf7cb882842 | |
parent | document post-install hooks (diff) | |
download | wireguard-openbsd-8e9543914d1309aea7e90f3ccafc1abc4617df8f.tar.xz wireguard-openbsd-8e9543914d1309aea7e90f3ccafc1abc4617df8f.zip |
simple optimization: if we're already erroring out, there's totally no
need to compute those pesky checksums.
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PkgCreate.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm index c5e436988b3..1aa8c882772 100644 --- a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm +++ b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm @@ -1,6 +1,6 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: PkgCreate.pm,v 1.68 2012/06/08 15:02:10 espie Exp $ +# $OpenBSD: PkgCreate.pm,v 1.69 2012/12/31 09:42:05 espie Exp $ # # Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org> # @@ -232,7 +232,8 @@ sub compute_checksum $result->make_hardlink($state->stash("$dev/$ino")); } else { $state->{stash}{"$dev/$ino"} = $name; - $result->add_digest($self->compute_digest($fname)); + $result->add_digest($self->compute_digest($fname)) + unless $state->{bad}; $result->add_size($size); } } elsif (-d _) { |