summaryrefslogtreecommitdiffstats
path: root/meta/classes/distutils.bbclass
diff options
context:
space:
mode:
authorRadek Dostal <radek.dostal@streamunlimited.com>2014-05-05 09:38:22 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-08 13:00:31 +0100
commitf88e6e36782ab757099b701a55a56a7197ca02cd (patch)
treeea68909c77cbc431390be6543dced1b04b0cd50a /meta/classes/distutils.bbclass
parent96e488b76a8334f61c35b163065f2f6081117e89 (diff)
downloadpoky-f88e6e36782ab757099b701a55a56a7197ca02cd.tar.gz
distutils.bbclass: only modify *.py file if it contains path to be removed
Currently sed command touches every single *.py file. This modifies the timestamp of the file. All *.pyo files will be recompiled during the first boot, because timestamp will not match. This should be only necessary if sed command changes the file. (From OE-Core rev: 2d01c5a4989dcf03a202c27730a2a8f334e0c37a) Signed-off-by: Radek Dostal <radek.dostal@streamunlimited.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/distutils.bbclass')
-rw-r--r--meta/classes/distutils.bbclass5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass
index f3da023942..12f26036fa 100644
--- a/meta/classes/distutils.bbclass
+++ b/meta/classes/distutils.bbclass
@@ -43,7 +43,10 @@ distutils_do_install() {
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 find ${D} -name "*.py" -print0 | while read -d $'\0' i ; do \
46 sed -i -e s:${D}::g "$i" 46 # only modify file if it contains path to avoid recompilation on the target
47 if grep -q "${D}" "$i"; then
48 sed -i -e s:${D}::g "$i"
49 fi
47 done 50 done
48 51
49 if test -e ${D}${bindir} ; then 52 if test -e ${D}${bindir} ; then