Patchwork util-linux: split fsck* into its own subpackage

login
register
mail settings
Submitter Koen Kooi
Date Oct. 6, 2011, 12:09 p.m.
Message ID <1317902994-21868-1-git-send-email-koen@dominion.thruhere.net>
Download mbox | patch
Permalink /patch/12783/
State New, archived
Headers show

Comments

Koen Kooi - Oct. 6, 2011, 12:09 p.m.
This will allow systemd to run /sbin/fsck without dragging in all of util-linux

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
 meta/recipes-core/util-linux/util-linux.inc       |   16 +++++++++++++---
 meta/recipes-core/util-linux/util-linux_2.19.1.bb |    2 +-
 2 files changed, 14 insertions(+), 4 deletions(-)

Patch

diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index afce673..4818d6f 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -29,7 +29,7 @@  PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfd
              util-linux-swaponoff util-linux-losetup util-linux-umount \
              util-linux-mount util-linux-readprofile util-linux-libblkid \
              util-linux-libblkid-dev util-linux-libuuid util-linux-libuuid-dev \
-             util-linux-uuidgen util-linux-lscpu"
+             util-linux-uuidgen util-linux-lscpu util-linux-fsck"
 
 EXTRA_OECONF = "--disable-use-tty-group --disable-makeinstall-chown --enable-elvtune --enable-init --enable-kill --enable-last \
  --enable-mesg --enable-partx --enable-raw --enable-rdev --enable-reset \
@@ -54,6 +54,8 @@  FILES_util-linux-libuuid = "${libdir}/libuuid.so.*"
 FILES_util-linux-libuuid-dev = "${libdir}/libuuid.so ${libdir}/libuuid.a ${libdir}/libuuid.la ${includedir}/uuid"
 FILES_util-linux-lscpu = "${bindir}/lscpu"
 
+FILES_util-linux-fsck = "${base_sbindir}/fsck*"
+
 RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile "
 RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup perl"
 
@@ -172,7 +174,6 @@  pkg_postinst_${PN} () {
 	update-alternatives --install ${base_sbindir}/pivot_root pivot_root pivot_root.${PN} 100
 #	update-alternatives --install ${base_sbindir}/sln sln sln.${PN} 100
 	update-alternatives --install ${base_sbindir}/mkfs.minix mkfs.minix mkfs.minix.${PN} 100
-	update-alternatives --install ${base_sbindir}/fsck.minix fsck.minix fsck.minix.${PN} 100
 	update-alternatives --install ${bindir}/hexdump hexdump hexdump.${PN} 100
 	update-alternatives --install ${bindir}/last last last.${PN} 100
 	update-alternatives --install ${bindir}/logger logger logger.${PN} 100
@@ -201,7 +202,6 @@  pkg_prerm_${PN} () {
 	update-alternatives --remove shutdown shutdown.${PN}
 #	update-alternatives --remove sln sln.${PN}
 	update-alternatives --remove mkfs.minix mkfs.minix.${PN}
-	update-alternatives --remove fsck.minix fsck.minix.${PN}
 	update-alternatives --remove hexdump hexdump.${PN}
 	update-alternatives --remove last last.${PN}
 	update-alternatives --remove logger logger.${PN}
@@ -252,4 +252,14 @@  pkg_prerm_util-linux-swaponoff () {
 	update-alternatives --remove swapon swapon.${PN}
 }
 
+pkg_postinst_util-linux-fsck () {	
+	update-alternatives --install ${base_sbindir}/fsck.minix fsck.minix fsck.minix.${PN} 100
+	update-alternatives --install ${base_sbindir}/fsck fsck.${PN} 100
+}
+
+pkg_prerm_util-linux-fsck () {
+	update-alternatives --remove fsck.minix fsck.minix.${PN}
+	update-alternatives --remove /fsck fsck.${PN}
+}
+
 BBCLASSEXTEND = "native"
diff --git a/meta/recipes-core/util-linux/util-linux_2.19.1.bb b/meta/recipes-core/util-linux/util-linux_2.19.1.bb
index 5b327cb..f6ddf37 100644
--- a/meta/recipes-core/util-linux/util-linux_2.19.1.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.19.1.bb
@@ -1,5 +1,5 @@ 
 MAJOR_VERSION = "2.19"
-PR = "r5"
+PR = "r6"
 require util-linux.inc
 
 # note that `lscpu' is under GPLv3+