Patchwork util-linux: moved 'reset' into own subpackage

login
register
mail settings
Submitter Enrico Scholz
Date Jan. 7, 2013, 1 p.m.
Message ID <1357563630-11930-1-git-send-email-enrico.scholz@sigma-chemnitz.de>
Download mbox | patch
Permalink /patch/42193/
State Accepted
Commit 1cecbacdbef77a94f701abadba7527a53b775acb
Headers show

Comments

Enrico Scholz - Jan. 7, 2013, 1 p.m.
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>

The 'reset' tool from util-linux is a shell script calling 'tput' which is
provided by 'ncurses'.  To avoid a 'util-linux' -> 'ncurses' dependency,
'reset' is put into an own subpackage which can be installed on demand.

Because most (all) systems are using 'busybux' which provides an
alternative 'reset' implementation, this should not cause too much
regressions.

Signed-off-by: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
---
 meta/recipes-core/util-linux/util-linux.inc       | 15 +++++++++++----
 meta/recipes-core/util-linux/util-linux_2.22.1.bb |  2 +-
 2 files changed, 12 insertions(+), 5 deletions(-)

Patch

diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index cd79895..667232c 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -33,7 +33,7 @@  PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfd
              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-fsck util-linux-blkid \
-             util-linux-mkfs util-linux-mcookie util-linux-systemd"
+             util-linux-mkfs util-linux-mcookie util-linux-systemd util-linux-reset"
 
 EXTRA_OECONF = "--libdir=${base_libdir} --disable-use-tty-group \
                 --disable-makeinstall-chown --enable-elvtune --enable-init \
@@ -60,6 +60,7 @@  FILES_util-linux-mcookie = "${bindir}/mcookie"
 FILES_util-linux-umount = "${base_bindir}/umount.${BPN}"
 FILES_util-linux-readprofile = "${base_sbindir}/readprofile.${BPN}"
 FILES_util-linux-uuidgen = "${bindir}/uuidgen"
+FILES_util-linux-reset = "${base_bindir}/reset"
 
 FILES_util-linux-libblkid = "${base_libdir}/libblkid.so.*"
 FILES_util-linux-libblkid-dev = "${base_libdir}/libblkid.so ${base_libdir}/libblkid.la ${includedir}/blkid ${libdir}/pkgconfig/blkid.pc"
@@ -75,6 +76,9 @@  FILES_util-linux-blkid = "${base_sbindir}/blkid*"
 RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid"
 RREPLACES_util-linux-blkid = "e2fsprogs-blkid"
 
+# reset calls 'tput'
+RDEPENDS_util-linux-reset += "ncurses"
+
 FILES_${PN}-systemd = "${systemd_unitdir}/system/"
 
 RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup"
@@ -83,6 +87,7 @@  RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-l
 RRECOMMENDS_${PN}_class-native = ""
 RDEPENDS_${PN}_class-native = ""
 
+
 do_compile () {
 	set -e
 	install ${WORKDIR}/MCONFIG ${S}/MCONFIG
@@ -138,15 +143,13 @@  inherit update-alternatives
 
 ALTERNATIVE_PRIORITY = "100"
 
-ALTERNATIVE_${PN}  = "dmesg kill more reset mkswap blockdev pivot_root"
+ALTERNATIVE_${PN}  = "dmesg kill more mkswap blockdev pivot_root"
 ALTERNATIVE_${PN} += "mkfs.minix hexdump last logger mesg renice wall"
 ALTERNATIVE_${PN} += "setsid chrt flock hwclock utmpdump eject"
 
 ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg"
 ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
 ALTERNATIVE_LINK_NAME[more] = "${base_bindir}/more"
-ALTERNATIVE_LINK_NAME[reset] = "${bindir}/reset"
-ALTERNATIVE_TARGET[reset] = "${base_bindir}/reset"
 ALTERNATIVE_LINK_NAME[mkswap] = "${base_sbindir}/mkswap"
 ALTERNATIVE_LINK_NAME[blockdev] = "${base_sbindir}/blockdev"
 ALTERNATIVE_LINK_NAME[pivot_root] = "${base_sbindir}/pivot_root"
@@ -185,4 +188,8 @@  ALTERNATIVE_LINK_NAME[fsck] = "${base_sbindir}/fsck"
 ALTERNATIVE_util-linux-blkid = "blkid"
 ALTERNATIVE_LINK_NAME[blkid] = "${base_sbindir}/blkid"
 
+ALTERNATIVE_util-linux-reset = "reset"
+ALTERNATIVE_LINK_NAME[reset] = "${bindir}/reset"
+ALTERNATIVE_TARGET[reset] = "${base_bindir}/reset"
+
 BBCLASSEXTEND = "native"
diff --git a/meta/recipes-core/util-linux/util-linux_2.22.1.bb b/meta/recipes-core/util-linux/util-linux_2.22.1.bb
index f5d777f..d734951 100644
--- a/meta/recipes-core/util-linux/util-linux_2.22.1.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.22.1.bb
@@ -1,5 +1,5 @@ 
 MAJOR_VERSION = "2.22"
-PR = "r2"
+PR = "r3"
 require util-linux.inc
 
 # note that `lscpu' is under GPLv3+