diff options
author | 2009-12-30 09:41:44 +0000 | |
---|---|---|
committer | 2009-12-30 09:41:44 +0000 | |
commit | f5205fbd455c53736d84c91e0ecfa8296e115fa9 (patch) | |
tree | 5bdc3755e718c528c0f72c6eae5c8d77f898b971 | |
parent | infrastructure for url elements (diff) | |
download | wireguard-openbsd-f5205fbd455c53736d84c91e0ecfa8296e115fa9.tar.xz wireguard-openbsd-f5205fbd455c53736d84c91e0ecfa8296e115fa9.zip |
take merging of sets into account when creating a header.
-rw-r--r-- | usr.sbin/pkg_add/pkg_add | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add index 220f9663474..416807fa204 100644 --- a/usr.sbin/pkg_add/pkg_add +++ b/usr.sbin/pkg_add/pkg_add @@ -1,7 +1,7 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg_add,v 1.450 2009/12/29 20:52:44 espie Exp $ +# $OpenBSD: pkg_add,v 1.451 2009/12/30 09:41:44 espie Exp $ # # Copyright (c) 2003-2009 Marc Espie <espie@openbsd.org> # @@ -87,10 +87,14 @@ sub deptree_header { my ($state, $pkg) = @_; if (defined $state->{deptree}->{$pkg}) { - return $state->{deptree}->{$pkg}->short_print.':'; - } else { - return ''; + my $s = $state->{deptree}->{$pkg}->real_set; + if ($s eq $pkg) { + delete $state->{deptree}->{$pkg}; + } else { + return $s->short_print.':'; + } } + return ''; } sub set_name_from_handle |