Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH][morty] perl, do_install_ptest_base: add "--" into "tar" command line
@ 2019-02-22 17:56 Ivan Efimov
  0 siblings, 0 replies; only message in thread
From: Ivan Efimov @ 2019-02-22 17:56 UTC (permalink / raw)
  To: OE-core

[-- Attachment #1: Type: text/plain, Size: 1629 bytes --]

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 

Signed-off-by: Ivan Efimov <i.efimov@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 


[-- Attachment #2: Type: text/html, Size: 2420 bytes --]

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-02-22 18:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-22 17:56 [PATCH][morty] perl, do_install_ptest_base: add "--" into "tar" command line Ivan Efimov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox