summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/base-files/base-files_3.0.14.bb
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2019-01-18 16:41:50 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-21 23:44:22 +0000
commite21c1e52a523c6eefda06f5a6561081d642e5f94 (patch)
tree7545cd5634e3bc210d3816233dd9c12e3947d87c /meta/recipes-core/base-files/base-files_3.0.14.bb
parent6ad8d2ce2727ec931deec82fa1837e0539746455 (diff)
downloadpoky-e21c1e52a523c6eefda06f5a6561081d642e5f94.tar.gz
base-files: Avoid problems if DISTRO_VERSION contains undefined variable
If DISTRO_VERSION is defined to some undefined variable, e.g., DISTRO_VERSION = "${FOO_VERSION}", and /bin/sh is dash, then do_install() would fail with an error such as: run.do_install.2945:193: run.do_install.2945: Syntax error: Unterminated quoted string This was due to unexpanded Python code making it into the shell code, confusing the shell parser. Reported-by: srinivasan <srinivasan.rns@gmail.com> (From OE-Core rev: fdd0b9e26ef11fa287692848ea3add64ba623433) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/base-files/base-files_3.0.14.bb')
-rw-r--r--meta/recipes-core/base-files/base-files_3.0.14.bb2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
index 6e30c149ba..f42a4ef7c4 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -150,7 +150,7 @@ do_install_basefilesissue () {
150 printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue 150 printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue
151 printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net 151 printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net
152 if [ -n "${DISTRO_VERSION}" ]; then 152 if [ -n "${DISTRO_VERSION}" ]; then
153 distro_version_nodate=${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot').replace('${DATE}','')} 153 distro_version_nodate="${@d.getVar('DISTRO_VERSION').replace('snapshot-${DATE}','snapshot').replace('${DATE}','')}"
154 printf "%s " $distro_version_nodate >> ${D}${sysconfdir}/issue 154 printf "%s " $distro_version_nodate >> ${D}${sysconfdir}/issue
155 printf "%s " $distro_version_nodate >> ${D}${sysconfdir}/issue.net 155 printf "%s " $distro_version_nodate >> ${D}${sysconfdir}/issue.net
156 fi 156 fi