[OE-core] [PATCH v2 27/33] dpkg: simplify replacing perl interpreter in scripts
Andreas Oberritter
obi at opendreambox.org
Thu Dec 8 21:47:51 UTC 2016
Target scripts already contain the correct value.
Signed-off-by: Andreas Oberritter <obi at opendreambox.org>
---
meta/recipes-devtools/dpkg/dpkg.inc | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index 2575fbb..d2dc38e 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -44,13 +44,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/
--
2.7.4
More information about the Openembedded-core
mailing list