* [PATCH 0/2] perl-native: fixed bad interpreter error
@ 2014-08-28 5:40 Robert Yang
2014-08-28 5:40 ` [PATCH 1/2] " Robert Yang
2014-08-28 5:40 ` [PATCH 2/2] cpan.bbclass: matches more lines Robert Yang
0 siblings, 2 replies; 3+ messages in thread
From: Robert Yang @ 2014-08-28 5:40 UTC (permalink / raw)
To: openembedded-core
The following changes since commit d0be4b37743492fc9c178fd6f9ef73a5eb2fd9c3:
chrpath: Drop warning from darwn builds (2014-08-17 10:01:30 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib rbt/perl
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/perl
Robert Yang (2):
perl-native: fixed bad interpreter error
cpan.bbclass: matches more lines
meta/classes/cpan.bbclass | 4 ++--
meta/recipes-devtools/perl/perl-native_5.20.0.bb | 5 +++++
2 files changed, 7 insertions(+), 2 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] perl-native: fixed bad interpreter error
2014-08-28 5:40 [PATCH 0/2] perl-native: fixed bad interpreter error Robert Yang
@ 2014-08-28 5:40 ` Robert Yang
2014-08-28 5:40 ` [PATCH 2/2] cpan.bbclass: matches more lines Robert Yang
1 sibling, 0 replies; 3+ messages in thread
From: Robert Yang @ 2014-08-28 5:40 UTC (permalink / raw)
To: openembedded-core
We may get the error on some hosts when build in deeper dir:
/bin/sh: /path/to/tmp/sysroots/i686-linux/usr/bin/perl-native/pod2man: /path/to/tmp/sysroots/i686-li:
bad interpreter: No such file or directory
Note the "i686-li", it should be "i686-linux", but is truncated by the
host.
We can use "/usr/bin/env nativeperl" as we have done in cpan.bbclass for
other recipe's perl script to fix the problem.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
meta/recipes-devtools/perl/perl-native_5.20.0.bb | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/meta/recipes-devtools/perl/perl-native_5.20.0.bb b/meta/recipes-devtools/perl/perl-native_5.20.0.bb
index 4364d41..069696a 100644
--- a/meta/recipes-devtools/perl/perl-native_5.20.0.bb
+++ b/meta/recipes-devtools/perl/perl-native_5.20.0.bb
@@ -105,6 +105,11 @@ do_install () {
create_wrapper ${D}${bindir}/perl PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl/'
create_wrapper ${D}${bindir}/perl${PV} PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl/'
+
+ # Use /usr/bin/env nativeperl for the perl script.
+ for f in `grep -Il '#! *${bindir}/perl' ${D}/${bindir}/*`; do
+ sed -i -e 's|${bindir}/perl|/usr/bin/env nativeperl|' $f
+ done
}
SYSROOT_PREPROCESS_FUNCS += "perl_sysroot_create_wrapper"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 2/2] cpan.bbclass: matches more lines
2014-08-28 5:40 [PATCH 0/2] perl-native: fixed bad interpreter error Robert Yang
2014-08-28 5:40 ` [PATCH 1/2] " Robert Yang
@ 2014-08-28 5:40 ` Robert Yang
1 sibling, 0 replies; 3+ messages in thread
From: Robert Yang @ 2014-08-28 5:40 UTC (permalink / raw)
To: openembedded-core
Fixed:
- There might be a space between "#!" and "/pat/to/usr/bin/perl", e.g.:
"#! /usr/bin/perl", now also matches it.
- There might be the lines like the following in the body:
eval 'exec /path/to/usr/bin/perl-native/perl -S $0 ${1+"$@"}'
Now we only check "#! */path/to/usr/bin/perl" to make sure it is a
perl script, but match and fix the lines in both header and body.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
meta/classes/cpan.bbclass | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/classes/cpan.bbclass b/meta/classes/cpan.bbclass
index 7088039..e2bbd2f 100644
--- a/meta/classes/cpan.bbclass
+++ b/meta/classes/cpan.bbclass
@@ -47,8 +47,8 @@ cpan_do_compile () {
cpan_do_install () {
oe_runmake DESTDIR="${D}" install_vendor
- for PERLSCRIPT in `grep -rIEl '#!${bindir}/perl-native.*/perl' ${D}`; do
- sed -i -e 's|^#!${bindir}/perl-native.*/perl|#!/usr/bin/env nativeperl|' $PERLSCRIPT
+ for PERLSCRIPT in `grep -rIEl '#! *${bindir}/perl-native.*/perl' ${D}`; do
+ sed -i -e 's|${bindir}/perl-native.*/perl|/usr/bin/env nativeperl|' $PERLSCRIPT
done
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-28 5:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-28 5:40 [PATCH 0/2] perl-native: fixed bad interpreter error Robert Yang
2014-08-28 5:40 ` [PATCH 1/2] " Robert Yang
2014-08-28 5:40 ` [PATCH 2/2] cpan.bbclass: matches more lines Robert Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox