[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-core
Subject:    [OE-core] [PATCH] binconfig: only try to mangles files
From:       Ross Burton <ross.burton () intel ! com>
Date:       2018-11-30 10:40:38
Message-ID: 20181130104038.3131-1-ross.burton () intel ! com
[Download RAW message or body]

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.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/classes/binconfig.bbclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/classes/binconfig.bbclass b/meta/classes/binconfig.bbclass
index 39c3e2b17bb..133b9537cf0 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
-- 
2.11.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic