Skip to contentSkip to conversation

perl, do_install_ptest_base: add "--" into "tar" command line

PATCH Superseded Ivan Efimov 1 participant 1 message Feb 22, 2019

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perl, do_install_ptest_base: add "--" into "tar" command line

Add explicit separator "--" between options and arguments in "tar" command to avoid mistakenly detection file which name starts with "-" as an unknown option

Steps for reproduce issue:

* Add next variables into "conf/local.conf":

CC_append_pn-perl = " -MD -Ml,M"
CXX_append_pn-perl = " -MD -Ml,M"

* Then "bitbake perl"
* Task "do_install_ptest_base" will fail with error:

tar: invalid option -- '.'

because of presence next file

tmp/work/i586-poky-linux/perl/5.22.1-r0/perl-5.22.1/-.d

which starts from minus (-) sign and Yocto tries to run:

tar <options> -.d <other files>

and "tar" parse "-.d" as a option instead of file

---
meta/recipes-devtools/perl/perl-ptest.inc | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-) 
meta/recipes-devtools/perl/perl-ptest.inc +0 -0
index d136c5c0e4..51367b5ed9 100644 
@@ -9,7 +9,7 @@ do_install_ptest () { 

sed -e "s:\/opt:\/usr:" -i Porting/add-package.pl
sed -e "s:\/local\/gnu\/:\/:" -i hints/cxux.sh
tar -c --exclude=\*.o --exclude=libperl.so --exclude=Makefile --exclude=makefile --exclude=hostperl \
- --exclude=miniperl --exclude=generate_uudmap --exclude=patches * | ( cd ${D}${PTEST_PATH} && tar -x )
+ --exclude=miniperl --exclude=generate_uudmap --exclude=patches -- * | ( cd ${D}${PTEST_PATH} && tar -x )

sed -i -e "s,${D},,g" \
-e "s,--sysroot=${STAGING_DIR_HOST},,g" \

Signature · 1 line
2.14.1