summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_add/OpenBSD
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2019-07-04 09:47:09 +0000
committerespie <espie@openbsd.org>2019-07-04 09:47:09 +0000
commit0fc009158f49f46c76e396d505e6f2ab7d2bfd71 (patch)
tree141269c5eab7ab7896c5528fab9cbd31d143b424 /usr.sbin/pkg_add/OpenBSD
parentwhen the mac address changes, update the mac/vlan filters accordingly. (diff)
downloadwireguard-openbsd-0fc009158f49f46c76e396d505e6f2ab7d2bfd71.tar.xz
wireguard-openbsd-0fc009158f49f46c76e396d505e6f2ab7d2bfd71.zip
gc old code (unused since it couldn't work without a state)
hack "print" to do the right thing because it wouldn't. this will probably need some cleanse at some point, like doing smart_join in a smarter way.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/UpdateSet.pm28
1 files changed, 7 insertions, 21 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm b/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm
index 95364f17ea6..0aa0512598e 100644
--- a/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm
+++ b/usr.sbin/pkg_add/OpenBSD/UpdateSet.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: UpdateSet.pm,v 1.84 2019/06/30 14:56:21 espie Exp $
+# $OpenBSD: UpdateSet.pm,v 1.85 2019/07/04 09:47:09 espie Exp $
#
# Copyright (c) 2007-2010 Marc Espie <espie@openbsd.org>
#
@@ -412,10 +412,12 @@ sub print
}
# XXX common case
if (defined $old && defined $new) {
- my $stema = OpenBSD::PackageName::splitstem($old);
- my ($stemb, @rest) = OpenBSD::PackageName::splitname($new);
- if ($stema eq $stemb) {
- return $result .$old."->".join('-', @rest);
+ my ($stema, @resta) = OpenBSD::PackageName::splitname($old);
+ my $resta = join('-', @resta);
+ my ($stemb, @restb) = OpenBSD::PackageName::splitname($new);
+ my $restb = join('-', @restb);
+ if ($stema eq $stemb && $resta !~ /\+/ && $restb !~ /\+/) {
+ return $result .$old."->".$restb;
}
}
@@ -498,22 +500,6 @@ sub cleanup_old_shared
}
}
-sub create_new
-{
- my ($class, $pkgname) = @_;
- my $set = $class->new;
- $set->add_newer(OpenBSD::Handle->create_new($pkgname));
- return $set;
-}
-
-sub from_location
-{
- my ($class, $location) = @_;
- my $set = $class->new;
- $set->add_newer(OpenBSD::Handle->from_location($location));
- return $set;
-}
-
my @extra = qw(solver conflict_cache);
sub mark_as_finished
{