summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2013-06-12 17:21:29 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-13 17:38:10 +0100
commitc88d41760a46b60c13c81c4ce148c2cb078a41bb (patch)
tree3c65549fde2413e82b842af7a3f8922d67d35a6e /meta
parent30d3c8d11e0c81a22a422346fe8c11ef37f2f33f (diff)
downloadpoky-c88d41760a46b60c13c81c4ce148c2cb078a41bb.tar.gz
dpkg: drop the usage of create_wrapper
create_wrapper was previously abused to invoke the Perl interpretter directly instead of relying on #! parsing, which is read into a 128 byte buffer so breaks with deep build directories. However we already install a "nativeperl" binary into the native sysroot, so use sed to change the #! line to /usr/bin/env nativeperl. (From OE-Core rev: c4f987239fe78783d732df673a5e592bb05a877d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/dpkg/dpkg.inc10
1 files changed, 1 insertions, 9 deletions
diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index 28c4f89d5c..b9d4da18f3 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -45,21 +45,13 @@ do_install_append () {
45 if [ "${PN}" = "dpkg-native" ]; then 45 if [ "${PN}" = "dpkg-native" ]; then
46 # update-alternatives doesn't have an offline mode 46 # update-alternatives doesn't have an offline mode
47 rm ${D}${bindir}/update-alternatives 47 rm ${D}${bindir}/update-alternatives
48 sed -i -e 's|^#!.*${bindir}/perl-native.*/perl|#!/usr/bin/env nativeperl|' ${D}${bindir}/dpkg-*
48 else 49 else
49 mv ${D}${bindir}/update-alternatives ${D}${sbindir} 50 mv ${D}${bindir}/update-alternatives ${D}${sbindir}
50 sed -i -e 's|^#!.*${bindir}/perl-native.*/perl|#!/usr/bin/env perl|' ${D}${bindir}/dpkg-* 51 sed -i -e 's|^#!.*${bindir}/perl-native.*/perl|#!/usr/bin/env perl|' ${D}${bindir}/dpkg-*
51 fi 52 fi
52} 53}
53 54
54# Create a wrapper for the perl script to avoid the "bad interpreter"
55# error when the tmpdir is longer than 150.
56do_install_append_class-native () {
57 tmp=`find ${D}${bindir} -type f -exec grep -m 1 -l '#!/.*/perl-native/perl' {} \;`
58 for i in $tmp; do
59 create_wrapper $i ${STAGING_BINDIR_NATIVE}/perl-native/perl
60 done
61}
62
63pkg_postinst_${PN} () { 55pkg_postinst_${PN} () {
64#!/bin/sh 56#!/bin/sh
65if [ "x$D" != "x" ] && [ -f $D/var/lib/dpkg/status ]; then 57if [ "x$D" != "x" ] && [ -f $D/var/lib/dpkg/status ]; then