summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkili <kili@openbsd.org>2015-03-26 22:07:58 +0000
committerkili <kili@openbsd.org>2015-03-26 22:07:58 +0000
commit2a9c0c9799b0e59eb33d1daef129cd1c7781489f (patch)
tree587f0e3215b5adfbb513a1ae04ff00df76aac4fe
parentWhitespace fix: Closing bracket belongs to if-block, not enclosing for (diff)
downloadwireguard-openbsd-2a9c0c9799b0e59eb33d1daef129cd1c7781489f.tar.xz
wireguard-openbsd-2a9c0c9799b0e59eb33d1daef129cd1c7781489f.zip
Backout -DSHORTENED semantics by default for now, because it caused
too much problems with the recent changes to net/libnet (in combination with security/dsniff); the PKGSPEC changes. Some more suspicious pudate problems mentioned by landry@. ok sthen@
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgAdd.pm4
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Signature.pm10
2 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm b/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm
index bd0868c7867..6a032dc0b1e 100644
--- a/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm
@@ -1,7 +1,7 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: PkgAdd.pm,v 1.84 2015/03/09 11:09:00 espie Exp $
+# $OpenBSD: PkgAdd.pm,v 1.85 2015/03/26 22:07:58 kili Exp $
#
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
#
@@ -39,7 +39,7 @@ sub has_different_sig
if (!defined $plist->{different_sig}) {
my $n = OpenBSD::PackingList->from_installation($plist->pkgname)->signature;
my $o = $plist->signature;
- my $r = $n->compare($o);
+ my $r = $n->compare($o, $state->defines("SHORTENED"));
$state->print("Comparing full signature for #1 \"#2\" vs. \"#3\":",
$plist->pkgname, $o->string, $n->string)
if $state->verbose >= 3;
diff --git a/usr.sbin/pkg_add/OpenBSD/Signature.pm b/usr.sbin/pkg_add/OpenBSD/Signature.pm
index 468aa8486f2..dac7d687412 100644
--- a/usr.sbin/pkg_add/OpenBSD/Signature.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Signature.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Signature.pm,v 1.17 2015/03/09 11:09:00 espie Exp $
+# $OpenBSD: Signature.pm,v 1.18 2015/03/26 22:07:58 kili Exp $
#
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
#
@@ -96,13 +96,13 @@ sub string
sub compare
{
- my ($a, $b) = @_;
- return $b->revert_compare($a);
+ my ($a, $b, $shortened) = @_;
+ return $b->revert_compare($a, $shortened);
}
sub revert_compare
{
- my ($b, $a) = @_;
+ my ($b, $a, $shortened) = @_;
if ($a->{name} eq $b->{name}) {
my $awins = 0;
@@ -116,7 +116,7 @@ sub revert_compare
next;
}
$done->{$k} = 1;
- next if !$v->always;
+ next if $shortened && !$v->always;
my $r = $v->compare($b->{extra}{$k});
if ($r > 0) {
$awins++;