From: Jason Wessel <jason.wessel@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH 4/4] dpkg: Provide update-alternative for start-stop-daemon
Date: Thu, 8 Aug 2019 05:55:09 -0700 [thread overview]
Message-ID: <20190808125509.120784-4-jason.wessel@windriver.com> (raw)
In-Reply-To: <20190808125509.120784-1-jason.wessel@windriver.com>
When using DISTRO_FEATURE usrmerge, busybox and something that
requires dpkg-start-stop there is a conflict which prints the
following error.
===
ERROR: core-image-minimal-1.0-r1 do_rootfs: Postinstall scriptlets of ['busybox'] have failed. If the intention is to defer them to first boot,
then please place them into pkg_postinst_ontarget_${PN} ().
Deferring to first boot via 'exit 1' is no longer supported.
Details of the failure are in /build/tmp-glibc/work/intel_x86_64-linux/core-image-minimal/1.0-r1/temp/log.do_rootfs.
ERROR: core-image-minimal-1.0-r1 do_rootfs: Function failed: do_rootfs
===
Looking at the log file, it shows the problem:
update-alternatives: Error: not linking /build/tmp-glibc/work/intel_x86_64-linux/core-image-minimal/1.0-r1/rootfs/usr/sbin/start-stop-daemon to /usr/bin/busybox.nosuid since /build/tmp-glibc/work/intel_x86_64-linux/core-image-minimal/1.0-r1/rootfs/usr/sbin/start-stop-daemon exists and is not a link
===
The solution is to add an update-alternative to start-stop-daemon for dpkg.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
---
meta/recipes-devtools/dpkg/dpkg.inc | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index fee7a75814..1c3c585d79 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -9,7 +9,7 @@ RDEPENDS_${PN}_class-native = ""
UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/dpkg/"
-inherit autotools gettext perlnative pkgconfig perl-version
+inherit autotools gettext perlnative pkgconfig perl-version update-alternatives
PERL_class-native = "${STAGING_BINDIR_NATIVE}/perl-native/perl"
@@ -76,7 +76,10 @@ RDEPENDS_${PN}-perl += "perl-module-carp perl-module-constant \
# the bitbake version.
#
PACKAGES =+ "${PN}-start-stop"
-FILES_${PN}-start-stop = "${sbindir}/start-stop-daemon"
+FILES_${PN}-start-stop = "${sbindir}/start-stop-daemon.${BPN}"
+ALTERNATIVE_${PN}-start-stop = "start-stop-daemon"
+ALTERNATIVE_LINK_NAME[start-stop-daemon] = "${sbindir}/start-stop-daemon"
+ALTERNATIVE_PRIORITY = "100"
RDEPENDS_${PN} += "${PN}-start-stop"
--
2.21.0
next prev parent reply other threads:[~2019-08-08 12:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-08 12:55 [PATCH 1/4] image_types_wic.bbclass: Copy the .wks and .env files to deploy image dir Jason Wessel
2019-08-08 12:55 ` [PATCH 2/4] wic: Add partition type for msdos partition tables Jason Wessel
2019-08-08 12:55 ` [PATCH 3/4] wic: Make disk partition size consistently computed Jason Wessel
2019-08-08 12:55 ` Jason Wessel [this message]
2019-08-08 16:45 ` [PATCH 1/4] image_types_wic.bbclass: Copy the .wks and .env files to deploy image dir Jason Wessel
2019-08-08 18:42 ` Richard Purdie
2019-08-08 20:09 ` Jason Wessel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190808125509.120784-4-jason.wessel@windriver.com \
--to=jason.wessel@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox