[oe-commits] Robert Yang : cpan.bbclass: matches more lines
git at git.openembedded.org
git at git.openembedded.org
Thu Aug 28 14:14:09 UTC 2014
Module: openembedded-core.git
Branch: master-next
Commit: 0d2e2ac137465885a1d55103010ccfdec579f1ce
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=0d2e2ac137465885a1d55103010ccfdec579f1ce
Author: Robert Yang <liezhi.yang at windriver.com>
Date: Wed Aug 27 22:40:06 2014 -0700
cpan.bbclass: matches more lines
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 at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
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
}
More information about the Openembedded-commits
mailing list