Before performing any work, unset a number of environment variables which

may adversely affect the port build.  See the man page for details.
This commit is contained in:
Dag-Erling Smørgrav
2004-12-30 17:45:43 +00:00
parent 2a2c94eded
commit 8a8dea62ac
6 changed files with 36 additions and 4 deletions

View File

@@ -8,7 +8,7 @@
#
PORTNAME= porteasy
PORTVERSION= 2.8.2
PORTVERSION= 2.8.3
CATEGORIES= misc
MASTER_SITES= # none
DISTFILES= # none

View File

@@ -332,6 +332,14 @@ Specifies a set of default options for
.Nm .
These options can be overridden by command line parameters.
.El
.Pp
The following variables are removed from the environment before any
work is performed:
.Ev CLASSPATH ,
.Ev LD_* ,
.Ev JAVA_* ,
.Ev USE_* ,
.Ev WANT_* .
.Sh FILES
.Nm
maintains and operates on a ports tree, normally

View File

@@ -33,7 +33,7 @@ use strict;
use Fcntl;
use Getopt::Long;
my $VERSION = "2.8.2";
my $VERSION = "2.8.3";
my $COPYRIGHT = "Copyright (c) 2000-2004 Dag-Erling Smørgrav. " .
"All rights reserved.";
@@ -1239,6 +1239,14 @@ MAIN:{
bsd::errx(1, "No CVS root, please use the -r option or set \$CVSROOT");
}
# Unset potentially troublesom environment variables
foreach my $var (sort(keys(%ENV))) {
if ($var =~ m/^(CLASSPATH|(LD|USE|JAVA|WANT)_\w+)$/) {
bsd::warnx("Removing $var from environment");
delete($ENV{$var});
}
}
# Step 1: update the ports tree infrastructure
$release = `uname -r`;
update_root();

View File

@@ -8,7 +8,7 @@
#
PORTNAME= porteasy
PORTVERSION= 2.8.2
PORTVERSION= 2.8.3
CATEGORIES= misc
MASTER_SITES= # none
DISTFILES= # none

View File

@@ -332,6 +332,14 @@ Specifies a set of default options for
.Nm .
These options can be overridden by command line parameters.
.El
.Pp
The following variables are removed from the environment before any
work is performed:
.Ev CLASSPATH ,
.Ev LD_* ,
.Ev JAVA_* ,
.Ev USE_* ,
.Ev WANT_* .
.Sh FILES
.Nm
maintains and operates on a ports tree, normally

View File

@@ -33,7 +33,7 @@ use strict;
use Fcntl;
use Getopt::Long;
my $VERSION = "2.8.2";
my $VERSION = "2.8.3";
my $COPYRIGHT = "Copyright (c) 2000-2004 Dag-Erling Smørgrav. " .
"All rights reserved.";
@@ -1239,6 +1239,14 @@ MAIN:{
bsd::errx(1, "No CVS root, please use the -r option or set \$CVSROOT");
}
# Unset potentially troublesom environment variables
foreach my $var (sort(keys(%ENV))) {
if ($var =~ m/^(CLASSPATH|(LD|USE|JAVA|WANT)_\w+)$/) {
bsd::warnx("Removing $var from environment");
delete($ENV{$var});
}
}
# Step 1: update the ports tree infrastructure
$release = `uname -r`;
update_root();