perl, do_install_ptest_base: add "--" into "tar" command line
PATCH v3 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 with 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
Signed-off-by Ivan Efimov <[email protected]>
--- meta/recipes-devtools/perl/perl-ptest.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/perl/perl-ptest.inc +1 -1
@@ -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