mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
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) (From OE-Core rev: 0903469ffd41c8e6a5ed8ba09817c004a16a477e) 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>
This commit is contained in:
committed by
Richard Purdie
parent
45dbb4a080
commit
e4b9dabfbb
@@ -43,7 +43,10 @@ distutils_do_install() {
|
||||
|
||||
# support filenames with *spaces*
|
||||
find ${D} -name "*.py" -print0 | while read -d $'\0' i ; do \
|
||||
sed -i -e s:${D}::g "$i"
|
||||
# only modify file if it contains path to avoid recompilation on the target
|
||||
if grep -q "${D}" "$i"; then
|
||||
sed -i -e s:${D}::g "$i"
|
||||
fi
|
||||
done
|
||||
|
||||
if test -e ${D}${bindir} ; then
|
||||
|
||||
Reference in New Issue
Block a user