[OE-core] [morty][PATCH v2] perl, do_install_ptest_base: add "--" into "tar" command line

Ivan Efimov i.efimov at inango-systems.com
Sun Mar 3 17:38:08 UTC 2019


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

Upstream-Status: Pending

Signed-off-by: Ivan Efimov <i.efimov at inango-systems.com>
---
 meta/recipes-devtools/perl/perl-ptest.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/perl/perl-ptest.inc b/meta/recipes-devtools/perl/perl-ptest.inc
index d136c5c0e4..51367b5ed9 100644
--- a/meta/recipes-devtools/perl/perl-ptest.inc
+++ b/meta/recipes-devtools/perl/perl-ptest.inc
@@ -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" \
-- 
2.14.1



More information about the Openembedded-core mailing list