diff options
author | Ross Burton <ross.burton@intel.com> | 2018-11-30 10:40:38 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-12-01 11:38:37 +0000 |
commit | 22fe4e27ec972c1a71b47bceff76e5b52a6a42ec (patch) | |
tree | de47fb65e4a75a2a6cb5ef14cc942a4d02e429f9 /meta/classes | |
parent | 67f5aac7dfe90f3d2c527fe6387ffc3256aa8065 (diff) | |
download | poky-22fe4e27ec972c1a71b47bceff76e5b52a6a42ec.tar.gz |
binconfig: only try to mangles files
If a file matches the glob that is an absolute symlink then sed will try to
alter files on the host, so restrict the search to just actual files.
(From OE-Core rev: 5556b5ca9efac132754bd82af52a0f68bc4ce85a)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/binconfig.bbclass | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/binconfig.bbclass b/meta/classes/binconfig.bbclass index 39c3e2b17b..133b9537cf 100644 --- a/meta/classes/binconfig.bbclass +++ b/meta/classes/binconfig.bbclass | |||
@@ -31,7 +31,7 @@ BINCONFIG_GLOB ?= "*-config" | |||
31 | PACKAGE_PREPROCESS_FUNCS += "binconfig_package_preprocess" | 31 | PACKAGE_PREPROCESS_FUNCS += "binconfig_package_preprocess" |
32 | 32 | ||
33 | binconfig_package_preprocess () { | 33 | binconfig_package_preprocess () { |
34 | for config in `find ${PKGD} -name '${BINCONFIG_GLOB}'`; do | 34 | for config in `find ${PKGD} -type f -name '${BINCONFIG_GLOB}'`; do |
35 | sed -i \ | 35 | sed -i \ |
36 | -e 's:${STAGING_BASELIBDIR}:${base_libdir}:g;' \ | 36 | -e 's:${STAGING_BASELIBDIR}:${base_libdir}:g;' \ |
37 | -e 's:${STAGING_LIBDIR}:${libdir}:g;' \ | 37 | -e 's:${STAGING_LIBDIR}:${libdir}:g;' \ |
@@ -40,7 +40,7 @@ binconfig_package_preprocess () { | |||
40 | -e 's:${STAGING_DIR_HOST}${prefix}:${prefix}:' \ | 40 | -e 's:${STAGING_DIR_HOST}${prefix}:${prefix}:' \ |
41 | $config | 41 | $config |
42 | done | 42 | done |
43 | for lafile in `find ${PKGD} -name "*.la"` ; do | 43 | for lafile in `find ${PKGD} -type f -name "*.la"` ; do |
44 | sed -i \ | 44 | sed -i \ |
45 | -e 's:${STAGING_BASELIBDIR}:${base_libdir}:g;' \ | 45 | -e 's:${STAGING_BASELIBDIR}:${base_libdir}:g;' \ |
46 | -e 's:${STAGING_LIBDIR}:${libdir}:g;' \ | 46 | -e 's:${STAGING_LIBDIR}:${libdir}:g;' \ |
@@ -54,7 +54,7 @@ binconfig_package_preprocess () { | |||
54 | SYSROOT_PREPROCESS_FUNCS += "binconfig_sysroot_preprocess" | 54 | SYSROOT_PREPROCESS_FUNCS += "binconfig_sysroot_preprocess" |
55 | 55 | ||
56 | binconfig_sysroot_preprocess () { | 56 | binconfig_sysroot_preprocess () { |
57 | for config in `find ${S} -name '${BINCONFIG_GLOB}'` `find ${B} -name '${BINCONFIG_GLOB}'`; do | 57 | for config in `find ${S} -type f -name '${BINCONFIG_GLOB}'` `find ${B} -type f -name '${BINCONFIG_GLOB}'`; do |
58 | configname=`basename $config` | 58 | configname=`basename $config` |
59 | install -d ${SYSROOT_DESTDIR}${bindir_crossscripts} | 59 | install -d ${SYSROOT_DESTDIR}${bindir_crossscripts} |
60 | sed ${@get_binconfig_mangle(d)} $config > ${SYSROOT_DESTDIR}${bindir_crossscripts}/$configname | 60 | sed ${@get_binconfig_mangle(d)} $config > ${SYSROOT_DESTDIR}${bindir_crossscripts}/$configname |