summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2011-09-17 09:49:56 +0000
committerMarc Espie <espie@cvs.openbsd.org>2011-09-17 09:49:56 +0000
commit42cf9d8dd807edb2197eb970ae464423ffd6f052 (patch)
treea74cffc0ce331ad18aabe0cd1e10bb19e252b9a4 /usr.sbin/pkg_add
parent50b45fa0fbccc844732873a1b26dcff259dd0ad1 (diff)
work-around for default vs. no flavor
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgCreate.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm
index 256a6a29dea..3a3dd0f9a66 100644
--- a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: PkgCreate.pm,v 1.47 2011/06/24 14:36:16 espie Exp $
+# $OpenBSD: PkgCreate.pm,v 1.48 2011/09/17 09:49:55 espie Exp $
#
# Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org>
#
@@ -640,7 +640,11 @@ sub ask_tree
if ($pid == 0) {
chdir $portsdir or exit 2;
open STDERR, '>', '/dev/null';
- $ENV{SUBDIR} = $dep->{pkgpath};
+ my ($dir, @parts) = split(/\,/, $dep->{pkgpath});
+ if (@parts == 0 || @parts == 1 && $parts[0] =~ m/^\-/) {
+ unshift(@parts, '');
+ }
+ $ENV{SUBDIR} = join(',', $dir, @parts);
$ENV{ECHO_MSG} = ':';
exec $make ('make', @action);
}