summaryrefslogtreecommitdiff
path: root/solenv/bin/modules
diff options
context:
space:
mode:
authorTim Retout <tim@retout.co.uk>2012-09-05 08:37:57 +0100
committerTim Retout <tim@retout.co.uk>2012-09-17 23:31:31 +0100
commit3ce06f2dc80cbe7858721d4617a761f71f59c0db (patch)
tree257c627afb702603305a9e9bbf1d4e38fdd12fcb /solenv/bin/modules
parent41086934cfb39f491c3f81e38a0286d66b2772cf (diff)
installer: Inline @installer::globals::environmentvariables
Change-Id: I9aab3ec39b833dac242b9ede21ac3f2e5eb78200
Diffstat (limited to 'solenv/bin/modules')
-rw-r--r--solenv/bin/modules/installer/control.pm18
-rw-r--r--solenv/bin/modules/installer/globals.pm1
2 files changed, 12 insertions, 7 deletions
diff --git a/solenv/bin/modules/installer/control.pm b/solenv/bin/modules/installer/control.pm
index bbb613a8caf7..7975bd926fd0 100644
--- a/solenv/bin/modules/installer/control.pm
+++ b/solenv/bin/modules/installer/control.pm
@@ -271,16 +271,22 @@ sub check_makecab_version
sub check_system_environment
{
my %variables = ();
- my $key;
my $error = 0;
- foreach $key ( @installer::globals::environmentvariables )
+ my @environmentvariables = qw(
+ SOLARVERSION
+ GUI
+ WORK_STAMP
+ OUTPATH
+ LOCAL_OUT
+ LOCAL_COMMON_OUT
+ );
+
+ for my $key ( @environmentvariables )
{
- my $value = "";
- if ( $ENV{$key} ) { $value = $ENV{$key}; }
- $variables{$key} = $value;
+ $variables{$key} = $ENV{$key} || "";
- if ( $value eq "" )
+ if ( $variables{$key} eq "" )
{
installer::logger::print_error( "$key not set in environment\n" );
$error = 1;
diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm
index bee3d0d24288..c99af766b5a8 100644
--- a/solenv/bin/modules/installer/globals.pm
+++ b/solenv/bin/modules/installer/globals.pm
@@ -263,7 +263,6 @@ BEGIN
@solarispatchscripts = ("checkinstall", "copyright", "patch_checkinstall", "patch_postinstall", "postinstall", "preinstall", "i.none");
@solarispatchscriptsforextensions = ("checkinstall", "copyright", "patch_checkinstall", "patch_postinstall_extensions", "postinstall_extensions", "preinstall", "i.none");
@solarispatchfiles = (".diPatch", "patchinfo");
- @environmentvariables = ( "SOLARVERSION", "GUI", "WORK_STAMP", "OUTPATH", "LOCAL_OUT", "LOCAL_COMMON_OUT" );
@packagelistitems = ("module", "solarispackagename", "packagename", "copyright", "vendor", "description" );
@languagepackfeature =();
@helppackfeature =();