aboutsummaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2015-04-21 17:18:00 +0800
committerChen Qi <Qi.Chen@windriver.com>2015-04-21 17:28:40 +0800
commitfb6ace7c72d1026cae4af1417822f424f991563f (patch)
treee9c47d422836c674bade8793d7b94639f8e2e191 /meta
parent4dc3c26daf47ec52cc46ed0b46eccbbe834cc43b (diff)
downloadopenembedded-core-contrib-fb6ace7c72d1026cae4af1417822f424f991563f.tar.gz
bash: explicitly define NON_INTERACTIVE_LOGIN_SHELLS in CFLAGSChenQi/bug-5539-7137
If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read the startup files, even if they are not interactive. This is the behaviour of other major distros like Ubuntu and Fedora. We also need to set it so that when executing `su -l xxx -c env' command, /etc/profile is parsed. [YOCTO #5359] [YOCTO #7137] Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/bash/bash.inc5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc
index d7b28cfffe..c06f157b8a 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -9,6 +9,11 @@ inherit autotools gettext texinfo update-alternatives ptest
EXTRA_AUTORECONF += "--exclude=autoheader"
EXTRA_OECONF = "--enable-job-control"
+# If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read the
+# startup files, even if they are not interactive.
+# This is what other major distros do. And this is what we wanted. See bug#5359 and bug#7137.
+CFLAGS += "-DNON_INTERACTIVE_LOGIN_SHELLS"
+
ALTERNATIVE_${PN} = "sh"
ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash"