diff options
author | Ross Burton <ross.burton@intel.com> | 2018-11-30 10:40:38 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-01-08 20:12:08 +0000 |
commit | 3d148218387e968dbf2d3d587329b37d22d7d19e (patch) | |
tree | 826bac623631e05fc25761dd3aea88c5e8bfcf73 | |
parent | 29759c2c3b4d97c835740a7f233b8e8f7b4570a1 (diff) | |
download | openembedded-core-3d148218387e968dbf2d3d587329b37d22d7d19e.tar.gz openembedded-core-3d148218387e968dbf2d3d587329b37d22d7d19e.tar.bz2 openembedded-core-3d148218387e968dbf2d3d587329b37d22d7d19e.zip |
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>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-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" PACKAGE_PREPROCESS_FUNCS += "binconfig_package_preprocess" binconfig_package_preprocess () { - for config in `find ${PKGD} -name '${BINCONFIG_GLOB}'`; do + for config in `find ${PKGD} -type f -name '${BINCONFIG_GLOB}'`; do sed -i \ -e 's:${STAGING_BASELIBDIR}:${base_libdir}:g;' \ -e 's:${STAGING_LIBDIR}:${libdir}:g;' \ @@ -40,7 +40,7 @@ binconfig_package_preprocess () { -e 's:${STAGING_DIR_HOST}${prefix}:${prefix}:' \ $config done - for lafile in `find ${PKGD} -name "*.la"` ; do + for lafile in `find ${PKGD} -type f -name "*.la"` ; do sed -i \ -e 's:${STAGING_BASELIBDIR}:${base_libdir}:g;' \ -e 's:${STAGING_LIBDIR}:${libdir}:g;' \ @@ -54,7 +54,7 @@ binconfig_package_preprocess () { SYSROOT_PREPROCESS_FUNCS += "binconfig_sysroot_preprocess" binconfig_sysroot_preprocess () { - for config in `find ${S} -name '${BINCONFIG_GLOB}'` `find ${B} -name '${BINCONFIG_GLOB}'`; do + for config in `find ${S} -type f -name '${BINCONFIG_GLOB}'` `find ${B} -type f -name '${BINCONFIG_GLOB}'`; do configname=`basename $config` install -d ${SYSROOT_DESTDIR}${bindir_crossscripts} sed ${@get_binconfig_mangle(d)} $config > ${SYSROOT_DESTDIR}${bindir_crossscripts}/$configname |