Menu

#5013 Fix scripts for environments where "set -ux" carries over

Verified
Enhancement
2017-01-11
2016-12-16
No

Fix scripts for environments where "set -ux" carries over

Normally, in Bourne shell scripts,
"set -ux" does not carry over to child processes.
However, under some conditions, it carries over to child processes.
(E.g. environment variable SHELLOPTS exists.)

If "set -ux" in smart-autogen.sh carries over to the child processes,
autoconf fails.

In order to avoid the issue,
this commit makes smart-autogen.sh and smart-configure.sh use
"set +ux" to cancel the effect of "set -ux"
just before invoking the child process.

Likewise, this commit also removes "set -e"
for avoiding "set -e" carrying over, and adds alternative error handling.

http://codereview.appspot.com/319870043

Discussion

  • Anonymous

    Anonymous - 2016-12-16
    • Description has changed:

    Diff:

    
    
    • Needs: -->
    • Patch: new --> review
     
  • Anonymous

    Anonymous - 2016-12-16

    Passes make, make check and a full make doc

     
  • Anonymous

    Anonymous - 2016-12-18
    • Patch: review --> countdown
     
  • Anonymous

    Anonymous - 2016-12-18

    Patch on countdown for December 21st

     
  • Anonymous

    Anonymous - 2016-12-21
    • Patch: countdown --> push
     
  • Anonymous

    Anonymous - 2016-12-21

    Patch counted down - please push.

     
  • Masamichi Hosoda

    • labels: --> Fixed_2_19_54
    • status: Started --> Fixed
    • Patch: push -->
     
  • Masamichi Hosoda

    I've pushed to staging.

    commit d73ef0f31f2e154633da4a763b9a20a13b920ca2
    Issue 5013: Fix scripts for environments where "set -ux" carries over

     
  • Graham Percival

    Graham Percival - 2017-01-11
    • status: Fixed --> Verified
     
  • Graham Percival

    Graham Percival - 2017-01-11

    I have verified that this commit is in git master.