config_host.mk.in | 1 - configure.ac | 19 ++++++------------- solenv/bin/modules/installer/parameter.pm | 6 ++---- solenv/bin/modules/installer/windows/msiglobal.pm | 11 +---------- solenv/bin/ooinstall | 6 +----- 5 files changed, 10 insertions(+), 33 deletions(-)
New commits: commit ebef182253e7d49c5439ab5053a7243ad24207a7 Author: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> Date: Tue Apr 30 20:17:49 2013 +0200 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 <dtar...@redhat.com> Tested-by: David Tardon <dtar...@redhat.com> diff --git a/config_host.mk.in b/config_host.mk.in index 6e5e0cd..cfe407c 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -534,7 +534,6 @@ export TELEPATHY_CFLAGS=$(gb_SPACE)@TELEPATHY_CFLAGS@ export TELEPATHY_LIBS=$(gb_SPACE)@TELEPATHY_LIBS@ export THES_SYSTEM_DIR=@THES_SYSTEM_DIR@ export TLS=@TLS@ -@x_Cygwin@ export TMP=@TMP_DIRECTORY@ export TMPDIR=@TEMP_DIRECTORY@ export TYPO_EXTENSION_PACK=@TYPO_EXTENSION_PACK@ export UNIXWRAPPERNAME=@UNIXWRAPPERNAME@ diff --git a/configure.ac b/configure.ac index 6588eaf..df85765 100644 --- a/configure.ac +++ b/configure.ac @@ -11839,22 +11839,15 @@ PathFormat "$PERL" PERL="$formatted_path" AC_SUBST(PERL) -if test "$build_os" = "cygwin"; then - TEMP_DIRECTORY=`cygpath -m "/tmp"` - if test -n "$TMP"; then - TMP_DIRECTORY="$TMP" - else - TMP_DIRECTORY="$TEMP_DIRECTORY" - fi +if test -n "$TMPDIR"; then + TEMP_DIRECTORY="$TMPDIR" else - if test -n "$TMPDIR"; then - TEMP_DIRECTORY="$TMPDIR" - else - TEMP_DIRECTORY="/tmp" - fi + TEMP_DIRECTORY="/tmp" +fi +if test "$build_os" = "cygwin"; then + TEMP_DIRECTORY=`cygpath -m "$TEMP_DIRECTORY"` fi AC_SUBST(TEMP_DIRECTORY) -AC_SUBST(TMP_DIRECTORY) # setup the PATH for the environment if test -n "$LO_PATH_FOR_BUILD"; then diff --git a/solenv/bin/modules/installer/parameter.pm b/solenv/bin/modules/installer/parameter.pm index deda9d3..3ca159f 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 6087d1d..2029f71 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 b9d52e5..4902dda 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') { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits