diff options
author | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2013-04-30 20:17:49 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2013-05-10 13:18:50 +0000 |
commit | ebef182253e7d49c5439ab5053a7243ad24207a7 (patch) | |
tree | 0f935b9afec26f4f6a56a3d7455dd9dbc636014d /solenv/bin | |
parent | 0a20a9c011e294a6d28d7e42184cd13ada1274ad (diff) |
don't override TMPDIR with /tmp on cygwin, cleanup TMPDIR/TMP handling
on cygwin, configure forced TMPDIR to /tmp, regardless whether it is set
or not. And while it respects an existing value of TMP, TMP is only used
in a few places. Changes the ones that explicitly check for TMP to
prefer TMPDIR, and don't duplicate configure's check in other scripts.
Change-Id: Ia8ac3f8d92e5f971c5237b85f66f7c0a58932930
Reviewed-on: https://gerrit.libreoffice.org/3701
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'solenv/bin')
-rw-r--r-- | solenv/bin/modules/installer/parameter.pm | 6 | ||||
-rw-r--r-- | solenv/bin/modules/installer/windows/msiglobal.pm | 11 | ||||
-rwxr-xr-x | solenv/bin/ooinstall | 6 |
3 files changed, 4 insertions, 19 deletions
diff --git a/solenv/bin/modules/installer/parameter.pm b/solenv/bin/modules/installer/parameter.pm index deda9d3b7445..3ca159fc8cfd 100644 --- a/solenv/bin/modules/installer/parameter.pm +++ b/solenv/bin/modules/installer/parameter.pm @@ -366,11 +366,9 @@ sub setglobalvariables # setting and creating the temppath - if (( $ENV{'TMP'} ) || ( $ENV{'TEMP'} ) || ( $ENV{'TMPDIR'} )) + if ( $ENV{'TMPDIR'} ) { - if ( $ENV{'TMP'} ) { $installer::globals::temppath = $ENV{'TMP'}; } - elsif ( $ENV{'TEMP'} ) { $installer::globals::temppath = $ENV{'TEMP'}; } - elsif ( $ENV{'TMPDIR'} ) { $installer::globals::temppath = $ENV{'TMPDIR'}; } + $installer::globals::temppath = $ENV{'TMPDIR'}; $installer::globals::temppath =~ s/\Q$installer::globals::separator\E\s*$//; # removing ending slashes and backslashes $installer::globals::temppath .= $installer::globals::separator . 'ooopackaging'; installer::systemactions::create_directory_with_privileges($installer::globals::temppath, "777"); diff --git a/solenv/bin/modules/installer/windows/msiglobal.pm b/solenv/bin/modules/installer/windows/msiglobal.pm index 6087d1dfb428..2029f717bfca 100644 --- a/solenv/bin/modules/installer/windows/msiglobal.pm +++ b/solenv/bin/modules/installer/windows/msiglobal.pm @@ -684,7 +684,6 @@ sub create_transforms $infoline = "ERROR: We cannot create transformations yet (we cannot use cscript.exe when cross-compiling)\n"; push( @installer::globals::logfileinfo, $infoline); } - my $tmpdir = $ENV{TMPDIR}; # Variable %TEMP% will be set to it for WiLangId.vbs to work my $wilangid = $ENV{WINDOWS_SDK_HOME} . "/Samples/SysMgmt/Msi/scripts/WiLangId.vbs"; my $from = cwd(); @@ -837,7 +836,7 @@ sub create_transforms } } - $systemcall = "TEMP=" . $tmpdir . " " . $cscript . " " . $wilangid . " " . $basedbname . " Package " . $templatevalue; + $systemcall = "TEMP=$ENV{'TMPDIR'} $cscript $wilangid $basedbname Package $templatevalue"; $returnvalue = system($systemcall); @@ -1225,11 +1224,6 @@ sub execute_packaging $infoline = "chdir: $to \n"; push( @installer::globals::logfileinfo, $infoline); - # changing the tmp directory, because makecab.exe generates temporary cab files - my $origtemppath = ""; - if ( $ENV{'TMP'} ) { $origtemppath = $ENV{'TMP'}; } - $ENV{'TMP'} = $installer::globals::temppath; # setting TMP to the new unique directory! - my $maxmakecabcalls = 3; my $allmakecabcalls = $#{$localpackjobref} + 1; @@ -1293,9 +1287,6 @@ sub execute_packaging installer::logger::include_timestamp_into_logfile("Performance Info: Execute packaging end"); - # setting back to the original tmp directory - $ENV{'TMP'} = $origtemppath; - chdir($from); $infoline = "chdir: $from \n"; push( @installer::globals::logfileinfo, $infoline); diff --git a/solenv/bin/ooinstall b/solenv/bin/ooinstall index b9d52e5d0f68..4902ddabf372 100755 --- a/solenv/bin/ooinstall +++ b/solenv/bin/ooinstall @@ -33,12 +33,8 @@ if ($ENV{OS} eq 'WNT') { if (defined($ENV{TMPDIR})) { $tmp_dir = $ENV{TMPDIR}; -} elsif (defined($ENV{TMP})) { - $tmp_dir = $ENV{TMP}; -} else { - $tmp_dir = '/tmp'; } -if (!-d $tmp_dir) {die "Set TMP or TMPDIR!\n";} +if (!-d $tmp_dir) {die "Set TMPDIR!\n";} # Workaround for system Mozilla if ($ENV{'SYSTEM_MOZILLA'} eq 'YES') { |