diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2012-12-31 09:42:06 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2012-12-31 09:42:06 +0000 |
commit | a2d89bf757192aa0e8d6e776ef4b52b6ea1e07a7 (patch) | |
tree | 69efd70cccdab5496442d07480f7e452dbc979cb /usr.sbin/pkg_add/OpenBSD | |
parent | 42115cbf10fdcb232e54dba1cc0f03c3e55e44e2 (diff) |
simple optimization: if we're already erroring out, there's totally no
need to compute those pesky checksums.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-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 _) { |