summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_add/pkg_mklocatedb
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2012-04-29 08:46:02 +0000
committerespie <espie@openbsd.org>2012-04-29 08:46:02 +0000
commit88d40ff8311246dfedb05df395b393b313371d74 (patch)
tree01864a8f42f1403eed74ce1a0e853a34c7a9fced /usr.sbin/pkg_add/pkg_mklocatedb
parentUse int not u_char for colours from options since they may have bit 8 (diff)
downloadwireguard-openbsd-88d40ff8311246dfedb05df395b393b313371d74.tar.xz
wireguard-openbsd-88d40ff8311246dfedb05df395b393b313371d74.zip
repair src/xsrc handling
fix it wrt FLAVOR/SUBPACKAGE passing
Diffstat (limited to 'usr.sbin/pkg_add/pkg_mklocatedb')
-rw-r--r--usr.sbin/pkg_add/pkg_mklocatedb9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/pkg_mklocatedb b/usr.sbin/pkg_add/pkg_mklocatedb
index 09ec15d824f..3a63c13e306 100644
--- a/usr.sbin/pkg_add/pkg_mklocatedb
+++ b/usr.sbin/pkg_add/pkg_mklocatedb
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# Copyright (c) 2005-2010 Marc Espie <espie@openbsd.org>
-# $OpenBSD: pkg_mklocatedb,v 1.32 2012/04/22 11:57:18 espie Exp $
+# $OpenBSD: pkg_mklocatedb,v 1.33 2012/04/29 08:46:02 espie Exp $
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
@@ -23,7 +23,6 @@ use OpenBSD::Getopt;
use OpenBSD::Error;
use OpenBSD::Paths;
use OpenBSD::AddCreateDelete;
-use File::Path;
package OpenBSD::Pkgmklocatedb::State;
our @ISA = qw(OpenBSD::AddCreateDelete::State);
@@ -123,7 +122,7 @@ sub open_output
}
}
-sub do_src
+sub do_source
{
my ($state, $src, $tag, @sets) = @_;
findos() if !defined $arch;
@@ -178,6 +177,8 @@ sub do_portsdir
my $make = $ENV{MAKE} || 'make';
my $target = defined $ENV{SUBDIRLIST} ?
'print-plist' : 'print-plist-all';
+ delete $ENV{FLAVOR};
+ delete $ENV{SUBPACKAGE};
open my $in, "cd $state->{portsdir} && $make $target |";
my $done = 0;
while (!$done) {
@@ -223,7 +224,7 @@ open_output($state);
if ($state->{srcdir}) {
do_source($state, $state->{srcdir}, 'src',
- qw(base comp etc game misc));
+ qw(base comp etc game));
}
if ($state->{xdir}) {
do_source($state, $state->{xdir}, 'xenocara',