diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-06-27 10:23:23 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-06-29 09:04:21 +0100 |
commit | 946fb184bf986b8bde2fe0502d48f69bc7cd4a18 (patch) | |
tree | aec660da19e084e2942a5e765b25de4b8d1cfcb7 /meta/classes | |
parent | 68824d9b8f6e290da078383316b3f4b732585f2b (diff) | |
download | poky-946fb184bf986b8bde2fe0502d48f69bc7cd4a18.tar.gz |
distutils/distutils3: Fix bashism
read -d is a bashism. Replace with a direct exec to avoid the problem
in this case. This fixes silent build failures in do_install of
tasks on systems with dash as /bin/sh.
Also merge the fix to distutils for only changing necessary files
to disutils3 as well.
(From OE-Core rev: 7d61661348cf48cbe379ae600565840ea08664b1)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/distutils.bbclass | 8 | ||||
-rw-r--r-- | meta/classes/distutils3.bbclass | 4 |
2 files changed, 3 insertions, 9 deletions
diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass index 12f26036fa..6ed7ecc99f 100644 --- a/meta/classes/distutils.bbclass +++ b/meta/classes/distutils.bbclass | |||
@@ -42,12 +42,8 @@ distutils_do_install() { | |||
42 | bbfatal "${PYTHON_PN} setup.py install execution failed." | 42 | bbfatal "${PYTHON_PN} setup.py install execution failed." |
43 | 43 | ||
44 | # support filenames with *spaces* | 44 | # support filenames with *spaces* |
45 | find ${D} -name "*.py" -print0 | while read -d $'\0' i ; do \ | 45 | # only modify file if it contains path to avoid recompilation on the target |
46 | # only modify file if it contains path to avoid recompilation on the target | 46 | find ${D} -name "*.py" -exec grep -q ${D} {} \; -exec sed -i -e s:${D}::g {} \; |
47 | if grep -q "${D}" "$i"; then | ||
48 | sed -i -e s:${D}::g "$i" | ||
49 | fi | ||
50 | done | ||
51 | 47 | ||
52 | if test -e ${D}${bindir} ; then | 48 | if test -e ${D}${bindir} ; then |
53 | for i in ${D}${bindir}/* ; do \ | 49 | for i in ${D}${bindir}/* ; do \ |
diff --git a/meta/classes/distutils3.bbclass b/meta/classes/distutils3.bbclass index bbd645cc63..e909ef41b6 100644 --- a/meta/classes/distutils3.bbclass +++ b/meta/classes/distutils3.bbclass | |||
@@ -64,9 +64,7 @@ distutils3_do_install() { | |||
64 | bbfatal "${PYTHON_PN} setup.py install execution failed." | 64 | bbfatal "${PYTHON_PN} setup.py install execution failed." |
65 | 65 | ||
66 | # support filenames with *spaces* | 66 | # support filenames with *spaces* |
67 | find ${D} -name "*.py" -print0 | while read -d $'\0' i ; do \ | 67 | find ${D} -name "*.py" -exec grep -q ${D} {} \; -exec sed -i -e s:${D}::g {} \; |
68 | sed -i -e s:${D}::g "$i" | ||
69 | done | ||
70 | 68 | ||
71 | if test -e ${D}${bindir} ; then | 69 | if test -e ${D}${bindir} ; then |
72 | for i in ${D}${bindir}/* ; do \ | 70 | for i in ${D}${bindir}/* ; do \ |