From: espie Date: Tue, 28 Jun 2016 17:35:34 +0000 (+0000) Subject: oops, $pkg can be more than a pkgname. We have the right information X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f729472cfc8193a42ff65b35713f57cdc1014c2b;p=openbsd oops, $pkg can be more than a pkgname. We have the right information in the plist, so use it instead. --- diff --git a/usr.sbin/pkg_add/OpenBSD/PkgInfo.pm b/usr.sbin/pkg_add/OpenBSD/PkgInfo.pm index f36ec2e0c67..3d4a9bc4ab7 100644 --- a/usr.sbin/pkg_add/OpenBSD/PkgInfo.pm +++ b/usr.sbin/pkg_add/OpenBSD/PkgInfo.pm @@ -1,6 +1,6 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: PkgInfo.pm,v 1.39 2016/06/28 15:38:36 espie Exp $ +# $OpenBSD: PkgInfo.pm,v 1.40 2016/06/28 17:35:34 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie # @@ -417,7 +417,7 @@ sub print_info my $plist; if ($state->opt('z')) { $plist = $handle->plist(\&OpenBSD::PackingList::ExtraInfoOnly); - my $name = OpenBSD::PackageName->new_from_string($pkg); + my $name = OpenBSD::PackageName->new_from_string($plist->pkgname); my $stem = $name->{stem}; my $compose = $stem."--".join('-', sort keys %{$name->{flavors}}); if ($plist->has('is-branch')) {