diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2015-08-13 08:13:45 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2015-08-13 08:13:45 +0000 |
commit | 246747aa8ca644b82579f775e4471fd058db3fcb (patch) | |
tree | 69109e36499854cac26301e62ac6a0b6504f5a7b /usr.sbin | |
parent | 568d83a322a315afeab4fee971c765b5e8f28bdd (diff) |
let pkg_create recreate all packages correctly, again.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PkgCreate.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm index cf48e51eec4..18f35a83e52 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.116 2015/05/18 10:41:20 espie Exp $ +# $OpenBSD: PkgCreate.pm,v 1.117 2015/08/13 08:13:44 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org> # @@ -237,7 +237,10 @@ sub compute_checksum $result->make_symlink($value); } elsif (-f _) { my ($dev, $ino, $size, $mtime) = (stat _)[0,1,7, 9]; - if (defined $state->stash("$dev/$ino")) { + # XXX when rebuilding packages, tied updates can produce + # spurious hardlinks. We also refer to the installed plist + # we're rebuilding to know if we must checksum. + if (defined $state->stash("$dev/$ino") && !defined $self->{d}) { $result->make_hardlink($state->stash("$dev/$ino")); } else { $state->{stash}{"$dev/$ino"} = $name; |