]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
e2fsprogs: add alternatives handling of lsattr as well
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Wed, 8 Jun 2022 13:12:05 +0000 (15:12 +0200)
committerSteve Sakoman <steve@sakoman.com>
Wed, 15 Jun 2022 16:40:10 +0000 (06:40 -1000)
Building busybox with CONFIG_LSATTR=y and installing that in the same
filesystem as e2fsprogs breaks:

  ERROR: ... 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.

Fix that by also alternatifying lsattr just as chattr already is.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 96703961eeb3460e9da26503d7942cc965d1e573)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/recipes-devtools/e2fsprogs/e2fsprogs_1.45.7.bb

index 3e6faf4cb820074630fd50f953917600d6b9d75d..b1abf6b858173eec2f0504d551dfe6d94744b817 100644 (file)
@@ -54,6 +54,7 @@ do_install () {
        oe_multilib_header ext2fs/ext2_types.h
        install -d ${D}${base_bindir}
        mv ${D}${bindir}/chattr ${D}${base_bindir}/chattr.e2fsprogs
+       mv ${D}${bindir}/lsattr ${D}${base_bindir}/lsattr.e2fsprogs
 
        install -v -m 755 ${S}/contrib/populate-extfs.sh ${D}${base_sbindir}/
 
@@ -102,10 +103,12 @@ FILES_libe2p = "${base_libdir}/libe2p.so.*"
 FILES_libext2fs = "${libdir}/e2initrd_helper ${base_libdir}/libext2fs.so.*"
 FILES_${PN}-dev += "${datadir}/*/*.awk ${datadir}/*/*.sed ${base_libdir}/*.so ${bindir}/compile_et ${bindir}/mk_cmds"
 
-ALTERNATIVE_${PN} = "chattr"
+ALTERNATIVE_${PN} = "chattr lsattr"
 ALTERNATIVE_PRIORITY = "100"
 ALTERNATIVE_LINK_NAME[chattr] = "${base_bindir}/chattr"
 ALTERNATIVE_TARGET[chattr] = "${base_bindir}/chattr.e2fsprogs"
+ALTERNATIVE_LINK_NAME[lsattr] = "${base_bindir}/lsattr"
+ALTERNATIVE_TARGET[lsattr] = "${base_bindir}/lsattr.e2fsprogs"
 
 ALTERNATIVE_${PN}-doc = "fsck.8"
 ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8"