Toolchain sdk location: http://autobuilder.yoctoproject.org/pub/nightly/20150202-1/toolchain/ Git rev: master/22c38e2d8a058619e3d05534b5e830b750aa4241 There is a warning message when installing toolchain sdk if using dash: #################### $ sudo sh poky-glibc-x86_64-core-image-sato-armv5te-toolchain-1.7.sh poky-glibc-x86_64-core-image-sato-armv5te-toolchain-1.7.sh: 58: read: Illegal option -e You are about to install the SDK to "/opt/poky/1.7". Proceed[Y/n]? ####################
This causes issue with Dash, the commit in question is back from Dizzy days: commit b0a9f30e19a2dece5350c4bd9d63355a6bbe214c Author: Dennis Meier <meier.dennis@siemens.com> Date: Tue Jun 17 15:16:53 2014 +0200 populate_sdk_base: add auto-completion in setup (From OE-Core rev: d6c55f6910270e395f668c9114ec374b44c57538) Signed-off-by: Dennis Meier <meier.dennis@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass index d3d8422..97cf1fb 100644 --- a/meta/classes/populate_sdk_base.bbclass +++ b/meta/classes/populate_sdk_base.bbclass @@ -174,9 +174,8 @@ if [ $verbose = 1 ] ; then set -x fi -printf "Enter target directory for SDK (default: $DEFAULT_INSTALL_DIR): " if [ "$target_sdk_dir" = "" ]; then - read target_sdk_dir + read -e -p "Enter target directory for SDK (default: $DEFAULT_INSTALL_DIR): " target_sdk_dir [ "$target_sdk_dir" = "" ] && target_sdk_dir=$DEFAULT_INSTALL_DIR else echo "$target_sdk_dir" Reverting this change will fix this issue
The poky-toolchain.sh script has a #!/bin/bash and should be marked as executeable so an "sh" should not been needed, and this is in fact what causes the problems, because calling it directly with sh will override the #!/bin/bash in the file. I reviewed the test case and it shows just executing the script directly, not using sh <script>, can you confirm if the script is correctly executable?
(In reply to comment #2) > The poky-toolchain.sh script has a #!/bin/bash and should be marked as > executeable so an "sh" should not been needed, and this is in fact what > causes > the problems, because calling it directly with sh will override the > #!/bin/bash > in the file. I reviewed the test case and it shows just executing the > script > directly, not using sh <script>, can you confirm if the script is correctly > executable? Yes, it works well. Steps: $ chmod a+x poky-glibc-x86_64-core-image-sato-armv5te-toolchain-1.7.sh $ ./poky-glibc-x86_64-core-image-sato-armv5te-toolchain-1.7.sh
This is not really a bug as noted above executing a script that has an explicit #!/bin/bash will be overridden with which ever shell is added on the command line. There is no definitive way to determine which shell is being executed to enable or disable the functionality of command line completion.
Verified as per above comments.