[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 67d4657 5/9: Fix defect introduced 20190420T2

From: Greg Chicares
Subject: [lmi-commits] [lmi] master 67d4657 5/9: Fix defect introduced 20190420T2117: non-minimal $PATH
Date: Sat, 18 May 2019 14:50:02 -0400 (EDT)

branch: master
commit 67d4657088a8e86980935473d250a77eacda3961
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Fix defect introduced 20190420T2117: non-minimal $PATH
    Prior to commit 7ea51651e7a4, this block of (pseudo)code was correct:
      # a minimal $PATH had already been set long before
      run commands that require only a minimal $PATH
      add lmi runtime paths to minimal $PATH
      run commands that require lmi runtime paths
    Commit 7ea51651e7a4 wrapped that block in a for-loop, rendering it
    incorrect: $PATH was minimal, as intended, only for the first iteration
    of the loop.
    Anyone who doesn't believe that $PATH should contain nothing more than
    is required also might not believe this matters. But proof is a higher
    standard than belief.
 install_msw.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/install_msw.sh b/install_msw.sh
index 285545e..275da78 100755
--- a/install_msw.sh
+++ b/install_msw.sh
@@ -199,6 +199,10 @@ export LMI_TRIPLET
 #for LMI_TRIPLET in i686-w64-mingw32 ;
 for LMI_TRIPLET in x86_64-w64-mingw32 i686-w64-mingw32 ;
+    # Set a minimal path for makefiles and scripts that are
+    # designed to be independent of lmi's runtime path.
+    export PATH="$minimal_path"
     # For Cygwin, install and use this msw-native compiler.
     # Install it for other build types, too, even if only for
     # validating the installation procedure.
@@ -219,6 +223,7 @@ do
     find /cache_for_lmi/downloads -type f | xargs md5sum
+    # Source this script only for commands that depend upon it.
     . ./set_toolchain.sh
     make $coefficiency --output-sync=recurse wx_config_check

reply via email to

[Prev in Thread] Current Thread [Next in Thread]