]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
dpkg: simplify replacing perl interpreter in scripts
authorAndreas Oberritter <obi@opendreambox.org>
Thu, 28 Aug 2014 14:04:21 +0000 (16:04 +0200)
committerAndreas Oberritter <obi@opendreambox.org>
Mon, 7 May 2018 21:25:22 +0000 (23:25 +0200)
Target scripts already contain the correct value.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
meta/recipes-devtools/dpkg/dpkg.inc

index d172f19a5af058614f9cad528cefbe2ed26f7508..3453244a6c0397c75af44cee9702e95f4d1b6a45 100644 (file)
@@ -47,13 +47,11 @@ do_configure_prepend_class-native() {
     sed -i -e 's|SYSCONFDIR|"${sysconfdir_native}"|' ${S}/utils/update-alternatives.c
 }
 
-do_install_append () {
-       if [ "${PN}" = "dpkg-native" ]; then
-               sed -i -e 's|^#!.*${bindir}/perl-native.*/perl|#!/usr/bin/env nativeperl|' ${D}${bindir}/dpkg-*
-       else
-               sed -i -e 's|^#!.*${bindir}/perl-native.*/perl|#!/usr/bin/env perl|' ${D}${bindir}/dpkg-*
-       fi
+do_install_append_class-native() {
+    sed -i -e 's|^#!${PERL}|#!/usr/bin/env nativeperl|' ${D}${bindir}/dpkg-*
+}
 
+do_install_append () {
        if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)};then
                install -d ${D}${systemd_unitdir}/system
                install -m 0644 ${WORKDIR}/dpkg-configure.service ${D}${systemd_unitdir}/system/