]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools/BuildEnv: Do not modify the env 'PACKAGES_PATH' in BuildEnv
authorHao Wu <hao.a.wu@intel.com>
Wed, 16 Nov 2016 08:35:56 +0000 (16:35 +0800)
committerHao Wu <hao.a.wu@intel.com>
Fri, 18 Nov 2016 00:32:28 +0000 (08:32 +0800)
https://bugzilla.tianocore.org/show_bug.cgi?id=236

The script 'BuildEnv' modifies the value of the environment variable
'PACKAGES_PATH' (line 44). The script will substitute the ':' symbol
(separating multiple paths) with a space.

This is not supposed to happen since users might later use 'PACKAGES_PATH'
during the code-building process under a multiple-workspace scenario.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/BuildEnv

index cb6403a52ba60bbc234f539da277d0bb78436d52..f74881111c8e56f0e476a62ca7cfdb0479cff2e3 100755 (executable)
@@ -2,7 +2,7 @@
 # Setup the environment for unix-like systems running a bash-like shell.
 # This file must be "sourced" not merely executed. For example: ". edksetup.sh"
 #
-# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
 # Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>
 # This program and the accompanying materials
 # are licensed and made available under the terms and conditions of the BSD License
@@ -41,8 +41,8 @@ RestorePreviousConfiguration() {
     export CONF_PATH=$WORKSPACE/Conf
     if [ ! -d $WORKSPACE/Conf ] && [ -n "$PACKAGES_PATH" ]
     then
-      PACKAGES_PATH=${PACKAGES_PATH//:/ }
-      for DIR in $PACKAGES_PATH
+      PATH_LIST=${PACKAGES_PATH//:/ }
+      for DIR in $PATH_LIST
       do
         if [ -d $DIR/Conf ]
         then
@@ -138,8 +138,8 @@ SetEdkToolsPath() {
   #
   if [ -n "$PACKAGES_PATH"]
   then
-    PACKAGES_PATH=${PACKAGES_PATH//:/ }
-    for DIR in $PACKAGES_PATH
+    PATH_LIST=${PACKAGES_PATH//:/ }
+    for DIR in $PATH_LIST
     do
       if [ -d $DIR/BaseTools ]
       then