* [PATCH] BaseTools/BuildEnv: override "set -C" (noclobber) in sourcing shell env
@ 2017-10-17 21:12 Laszlo Ersek
2017-10-18 8:01 ` Gao, Liming
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Laszlo Ersek @ 2017-10-17 21:12 UTC (permalink / raw)
To: edk2-devel-01; +Cc: Liming Gao, Thomas Huth, Yonghong Zhu
The BuildEnv utility is sourced (executed by the user's interactive shell)
when the user sets up the build session. Some users like to set -C
(noclobber) for some additional safety in their shells, which trips up
BuildEnv. Update the redirection operator so that it overrides noclobber.
Cc: Liming Gao <liming.gao@intel.com>
Cc: Thomas Huth <thuth@redhat.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
Notes:
Repo: https://github.com/lersek/edk2.git
Branch: buildenv_clobber
BaseTools/BuildEnv | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/BaseTools/BuildEnv b/BaseTools/BuildEnv
index f74881111c8e..ff0c5115a5e1 100755
--- a/BaseTools/BuildEnv
+++ b/BaseTools/BuildEnv
@@ -90,7 +90,7 @@ StoreCurrentConfiguration() {
#
OUTPUT_FILE=$CONF_PATH/BuildEnv.sh
#echo Storing current configuration into $OUTPUT_FILE
- echo "# Auto-generated by ${BASH_SOURCE[0]}" > $OUTPUT_FILE
+ echo "# Auto-generated by ${BASH_SOURCE[0]}" >| $OUTPUT_FILE
GenerateShellCodeToSetVariable WORKSPACE $OUTPUT_FILE
GenerateShellCodeToSetVariable EDK_TOOLS_PATH $OUTPUT_FILE
GenerateShellCodeToUpdatePath $OUTPUT_FILE
--
2.14.1.3.gb7cf6e02401b
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] BaseTools/BuildEnv: override "set -C" (noclobber) in sourcing shell env
2017-10-17 21:12 [PATCH] BaseTools/BuildEnv: override "set -C" (noclobber) in sourcing shell env Laszlo Ersek
@ 2017-10-18 8:01 ` Gao, Liming
[not found] ` <eb415ec8-bfbf-bd02-b5c1-7cb2c4c04c21@redhat.com>
2017-10-18 9:37 ` Laszlo Ersek
2 siblings, 0 replies; 4+ messages in thread
From: Gao, Liming @ 2017-10-18 8:01 UTC (permalink / raw)
To: Laszlo Ersek, edk2-devel-01; +Cc: Thomas Huth, Zhu, Yonghong
Reviewed-by: Liming Gao <liming.gao@intel.com>
>-----Original Message-----
>From: Laszlo Ersek [mailto:lersek@redhat.com]
>Sent: Wednesday, October 18, 2017 5:13 AM
>To: edk2-devel-01 <edk2-devel@lists.01.org>
>Cc: Gao, Liming <liming.gao@intel.com>; Thomas Huth <thuth@redhat.com>;
>Zhu, Yonghong <yonghong.zhu@intel.com>
>Subject: [PATCH] BaseTools/BuildEnv: override "set -C" (noclobber) in
>sourcing shell env
>
>The BuildEnv utility is sourced (executed by the user's interactive shell)
>when the user sets up the build session. Some users like to set -C
>(noclobber) for some additional safety in their shells, which trips up
>BuildEnv. Update the redirection operator so that it overrides noclobber.
>
>Cc: Liming Gao <liming.gao@intel.com>
>Cc: Thomas Huth <thuth@redhat.com>
>Cc: Yonghong Zhu <yonghong.zhu@intel.com>
>Contributed-under: TianoCore Contribution Agreement 1.1
>Signed-off-by: Laszlo Ersek <lersek@redhat.com>
>---
>
>Notes:
> Repo: https://github.com/lersek/edk2.git
> Branch: buildenv_clobber
>
> BaseTools/BuildEnv | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/BaseTools/BuildEnv b/BaseTools/BuildEnv
>index f74881111c8e..ff0c5115a5e1 100755
>--- a/BaseTools/BuildEnv
>+++ b/BaseTools/BuildEnv
>@@ -90,7 +90,7 @@ StoreCurrentConfiguration() {
> #
> OUTPUT_FILE=$CONF_PATH/BuildEnv.sh
> #echo Storing current configuration into $OUTPUT_FILE
>- echo "# Auto-generated by ${BASH_SOURCE[0]}" > $OUTPUT_FILE
>+ echo "# Auto-generated by ${BASH_SOURCE[0]}" >| $OUTPUT_FILE
> GenerateShellCodeToSetVariable WORKSPACE $OUTPUT_FILE
> GenerateShellCodeToSetVariable EDK_TOOLS_PATH $OUTPUT_FILE
> GenerateShellCodeToUpdatePath $OUTPUT_FILE
>--
>2.14.1.3.gb7cf6e02401b
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] BaseTools/BuildEnv: override "set -C" (noclobber) in sourcing shell env
[not found] ` <eb415ec8-bfbf-bd02-b5c1-7cb2c4c04c21@redhat.com>
@ 2017-10-18 8:42 ` Laszlo Ersek
0 siblings, 0 replies; 4+ messages in thread
From: Laszlo Ersek @ 2017-10-18 8:42 UTC (permalink / raw)
To: Thomas Huth, edk2-devel-01; +Cc: Liming Gao, Yonghong Zhu
Responding to this email because Thomas may not be subscribed to
edk2-devel, and edk2-devel *still* drops emails from non-subscribers
(which I think is extremely rude, see
<https://bugzilla.tianocore.org/show_bug.cgi?id=451>, but I'm really out
of devices to make the right thing happen):
On 10/18/17 10:00, Thomas Huth wrote:
> On 17.10.2017 23:12, Laszlo Ersek wrote:
>> The BuildEnv utility is sourced (executed by the user's interactive shell)
>> when the user sets up the build session. Some users like to set -C
>> (noclobber) for some additional safety in their shells, which trips up
>> BuildEnv. Update the redirection operator so that it overrides noclobber.
>>
>> Cc: Liming Gao <liming.gao@intel.com>
>> Cc: Thomas Huth <thuth@redhat.com>
>> Cc: Yonghong Zhu <yonghong.zhu@intel.com>
>> Contributed-under: TianoCore Contribution Agreement 1.1
>> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
>> ---
>>
>> Notes:
>> Repo: https://github.com/lersek/edk2.git
>> Branch: buildenv_clobber
>>
>> BaseTools/BuildEnv | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/BaseTools/BuildEnv b/BaseTools/BuildEnv
>> index f74881111c8e..ff0c5115a5e1 100755
>> --- a/BaseTools/BuildEnv
>> +++ b/BaseTools/BuildEnv
>> @@ -90,7 +90,7 @@ StoreCurrentConfiguration() {
>> #
>> OUTPUT_FILE=$CONF_PATH/BuildEnv.sh
>> #echo Storing current configuration into $OUTPUT_FILE
>> - echo "# Auto-generated by ${BASH_SOURCE[0]}" > $OUTPUT_FILE
>> + echo "# Auto-generated by ${BASH_SOURCE[0]}" >| $OUTPUT_FILE
>> GenerateShellCodeToSetVariable WORKSPACE $OUTPUT_FILE
>> GenerateShellCodeToSetVariable EDK_TOOLS_PATH $OUTPUT_FILE
>> GenerateShellCodeToUpdatePath $OUTPUT_FILE
>>
>
> FWIW:
>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
>
So, now Thomas's R-b can be seen on the list as well.
Thank you!
Laszlo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] BaseTools/BuildEnv: override "set -C" (noclobber) in sourcing shell env
2017-10-17 21:12 [PATCH] BaseTools/BuildEnv: override "set -C" (noclobber) in sourcing shell env Laszlo Ersek
2017-10-18 8:01 ` Gao, Liming
[not found] ` <eb415ec8-bfbf-bd02-b5c1-7cb2c4c04c21@redhat.com>
@ 2017-10-18 9:37 ` Laszlo Ersek
2 siblings, 0 replies; 4+ messages in thread
From: Laszlo Ersek @ 2017-10-18 9:37 UTC (permalink / raw)
To: edk2-devel-01; +Cc: Thomas Huth, Liming Gao
On 10/17/17 23:12, Laszlo Ersek wrote:
> The BuildEnv utility is sourced (executed by the user's interactive shell)
> when the user sets up the build session. Some users like to set -C
> (noclobber) for some additional safety in their shells, which trips up
> BuildEnv. Update the redirection operator so that it overrides noclobber.
>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Thomas Huth <thuth@redhat.com>
> Cc: Yonghong Zhu <yonghong.zhu@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
>
> Notes:
> Repo: https://github.com/lersek/edk2.git
> Branch: buildenv_clobber
>
> BaseTools/BuildEnv | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/BaseTools/BuildEnv b/BaseTools/BuildEnv
> index f74881111c8e..ff0c5115a5e1 100755
> --- a/BaseTools/BuildEnv
> +++ b/BaseTools/BuildEnv
> @@ -90,7 +90,7 @@ StoreCurrentConfiguration() {
> #
> OUTPUT_FILE=$CONF_PATH/BuildEnv.sh
> #echo Storing current configuration into $OUTPUT_FILE
> - echo "# Auto-generated by ${BASH_SOURCE[0]}" > $OUTPUT_FILE
> + echo "# Auto-generated by ${BASH_SOURCE[0]}" >| $OUTPUT_FILE
> GenerateShellCodeToSetVariable WORKSPACE $OUTPUT_FILE
> GenerateShellCodeToSetVariable EDK_TOOLS_PATH $OUTPUT_FILE
> GenerateShellCodeToUpdatePath $OUTPUT_FILE
>
Thank you all for the reviews, patch pushed as commit 4bbf39632c84.
Laszlo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-18 9:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-17 21:12 [PATCH] BaseTools/BuildEnv: override "set -C" (noclobber) in sourcing shell env Laszlo Ersek
2017-10-18 8:01 ` Gao, Liming
[not found] ` <eb415ec8-bfbf-bd02-b5c1-7cb2c4c04c21@redhat.com>
2017-10-18 8:42 ` Laszlo Ersek
2017-10-18 9:37 ` Laszlo Ersek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox