public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] BaseTools/BuildEnv: Do not modify the env 'PACKAGES_PATH' in BuildEnv
@ 2016-11-16  8:47 Hao Wu
  2016-11-16  8:48 ` Gao, Liming
  0 siblings, 1 reply; 2+ messages in thread
From: Hao Wu @ 2016-11-16  8:47 UTC (permalink / raw)
  To: edk2-devel; +Cc: Hao Wu, Liming Gao, Yonghong Zhu

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
(seperating 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>
---
 BaseTools/BuildEnv | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/BaseTools/BuildEnv b/BaseTools/BuildEnv
index cb6403a..f748811 100755
--- a/BaseTools/BuildEnv
+++ b/BaseTools/BuildEnv
@@ -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
-- 
1.9.5.msysgit.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] BaseTools/BuildEnv: Do not modify the env 'PACKAGES_PATH' in BuildEnv
  2016-11-16  8:47 [PATCH] BaseTools/BuildEnv: Do not modify the env 'PACKAGES_PATH' in BuildEnv Hao Wu
@ 2016-11-16  8:48 ` Gao, Liming
  0 siblings, 0 replies; 2+ messages in thread
From: Gao, Liming @ 2016-11-16  8:48 UTC (permalink / raw)
  To: Wu, Hao A, edk2-devel@lists.01.org

Reviewed-by: Liming Gao <liming.gao@intel.com>

> -----Original Message-----
> From: Wu, Hao A
> Sent: Wednesday, November 16, 2016 4:47 PM
> To: edk2-devel@lists.01.org
> Cc: Wu, Hao A <hao.a.wu@intel.com>; Gao, Liming <liming.gao@intel.com>;
> Zhu, Yonghong <yonghong.zhu@intel.com>
> Subject: [PATCH] BaseTools/BuildEnv: Do not modify the env
> 'PACKAGES_PATH' in BuildEnv
> 
> 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
> (seperating 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>
> ---
>  BaseTools/BuildEnv | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/BaseTools/BuildEnv b/BaseTools/BuildEnv
> index cb6403a..f748811 100755
> --- a/BaseTools/BuildEnv
> +++ b/BaseTools/BuildEnv
> @@ -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
> --
> 1.9.5.msysgit.0



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-16  8:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-16  8:47 [PATCH] BaseTools/BuildEnv: Do not modify the env 'PACKAGES_PATH' in BuildEnv Hao Wu
2016-11-16  8:48 ` Gao, Liming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox