[meta-oe][PATCH 2/4] libdev-checklib-perl: fix interpreter of script use-devel-checklib


Kai Kang
 

From: Kai Kang <kai.kang@...>

Update interpreter on shebang line in script use-devel-checklib to fix
QA error:

ERROR: QA Issue: : /work/x86_64-linux/libdev-checklib-perl-native/1.14-r0/sysroot-destdir/
work/x86_64-linux/libdev-checklib-perl-native/1.14-r0/recipe-sysroot-native/usr/bin/use-devel-checklib
maximum shebang size exceeded, the maximum size is 128. [shebang-size]

It also replace option '-w' on shebang line with 'use warnings;' that
old version env doesn't support multiple arguments.

Signed-off-by: Kai Kang <kai.kang@...>
---
.../recipes-devtools/perl/libdev-checklib-perl_1.14.bb | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/meta-oe/recipes-devtools/perl/libdev-checklib-perl_1.14.bb b/meta-oe/recipes-devtools/perl/libdev-checklib-perl_1.14.bb
index 6dfff781b..0863bb862 100644
--- a/meta-oe/recipes-devtools/perl/libdev-checklib-perl_1.14.bb
+++ b/meta-oe/recipes-devtools/perl/libdev-checklib-perl_1.14.bb
@@ -18,4 +18,12 @@ S = "${WORKDIR}/Devel-CheckLib-${PV}"

inherit cpan

+do_install:append() {
+ # update interpreter on shebang line
+ # since old version env doesn't support multiple arguments, replace option
+ # '-w' with 'use warnings;'
+ sed -i -e "s:^#!.*:#!/usr/bin/env perl:" \
+ -e "/use strict;/ause warnings;" ${D}${bindir}/use-devel-checklib
+}
+
BBCLASSEXTEND="native"
--
2.17.1

Join openembedded-devel@lists.openembedded.org to automatically receive all group messages.