in the plist, so use it instead.
#! /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 <espie@openbsd.org>
#
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')) {