All of lore.kernel.org
 help / color / mirror / Atom feed
* util-linux-ng: handle reset problem
@ 2010-09-13 11:15 Eric Bénard
  2010-09-13 11:17 ` [PATCH] util-linux-ng: reset rdepends on ncurses-tools Eric Bénard
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Bénard @ 2010-09-13 11:15 UTC (permalink / raw)
  To: openembedded-devel

Hi,

util-linux-ng's reset is a script which is using tput which is provided 
by ncurses-tools (which also provides reset).
2 patches will follow :
- first one creates a util-linux-ng-reset package which rdepends on 
ncurses-utils
- second one remove util-linux-ng's reset to use ncurses-tools' one.

Which solution is preferred ?

Eric



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] util-linux-ng: reset rdepends on ncurses-tools
  2010-09-13 11:15 util-linux-ng: handle reset problem Eric Bénard
@ 2010-09-13 11:17 ` Eric Bénard
  2010-09-13 11:17   ` [PATCH] util-linux-ng: remove reset Eric Bénard
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Bénard @ 2010-09-13 11:17 UTC (permalink / raw)
  To: openembedded-devel

* reset is a script which is using tput provided by ncurses-tools
  (which also provides reset) so util-linux-ng's reset command fails
  if ncurses-tools is not installed on the target
* this patch creates a utils-linux-ng-reset package with
  RDEPENDS="ncurses-tools"

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 recipes/util-linux-ng/util-linux-ng.inc |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/recipes/util-linux-ng/util-linux-ng.inc b/recipes/util-linux-ng/util-linux-ng.inc
index a829b08..b5dd25b 100644
--- a/recipes/util-linux-ng/util-linux-ng.inc
+++ b/recipes/util-linux-ng/util-linux-ng.inc
@@ -8,7 +8,7 @@ inherit autotools gettext
 
 DEFAULT_PREFERENCE = "-1"
 
-INC_PR = "r29"
+INC_PR = "r30"
 
 # allows for a release candidate
 RC ?= ""
@@ -19,7 +19,7 @@ SRC_URI_append_chinook-compat = " file://chinook_libtool.patch "
 
 PACKAGES =+ "${PN}-fdisk ${PN}-cfdisk ${PN}-sfdisk ${PN}-swaponoff \
 	     ${PN}-losetup ${PN}-umount ${PN}-mount ${PN}-readprofile \
-	     ${PN}-fsck ${PN}-blkid ${PN}-mountall"
+	     ${PN}-fsck ${PN}-blkid ${PN}-mountall ${PN}-reset"
 
 PACKAGES_virtclass-native = ""	     
 
@@ -55,12 +55,14 @@ FILES_util-linux-ng-readprofile = "${sbindir}/readprofile.${PN}"
 FILES_util-linux-ng-fsck = "${base_sbindir}/fsck.${PN}"
 FILES_util-linux-ng-blkid = "${base_sbindir}/blkid.${PN}"
 FILES_${PN}-mountall = "${sysconfdir}/default/mountall.${PN}"
+FILES_${PN}-reset = "${bindir}/reset.${PN}"
 
 RREPLACES_util-linux-ng-blkid = "e2fsprogs-blkid"
 RREPLACES_${PN}-mountall = "busybox-mountall"
 
 RRECOMMENDS_${PN} = "${PN}-fdisk ${PN}-cfdisk ${PN}-sfdisk ${PN}-mount ${PN}-readprofile"
 RDEPENDS_${PN} = "${PN}-mountall ${PN}-umount ${PN}-swaponoff ${PN}-losetup ${PN}-fsck ${PN}-blkid"
+RDEPENDS_${PN}-reset = "ncurses-tools"
 
 RRECOMMENDS_${PN}_virtclass-native = ""
 RDEPENDS_${PN}_virtclass-native = ""
@@ -214,7 +216,6 @@ pkg_postinst_${PN} () {
 	update-alternatives --install ${base_bindir}/login login login.${PN} 100
 	update-alternatives --install ${base_sbindir}/vipw vipw vipw.${PN} 100
 	update-alternatives --install ${base_sbindir}/vigr vigr vigr.${PN} 100
-	update-alternatives --install ${bindir}/reset reset reset.${PN} 100
 	update-alternatives --install ${bindir}/setsid setsid setsid.${PN} 100
 	update-alternatives --install ${bindir}/chrt chrt chrt.${PN} 100
 	
@@ -230,11 +231,19 @@ pkg_prerm_${PN} () {
 	test -x ${base_sbindir}/pivot_root.${PN} && \
 	update-alternatives --remove pivot_root pivot_root.${PN}
 
-	for i in dmesg kill more halt hwclock mkswap reboot shutdown sln mkfs.minix fsck.minix hexdump setsid chrt last logger mesg renice wall vipw vigr chfn newgrp chsh login reset; do
+	for i in dmesg kill more halt hwclock mkswap reboot shutdown sln mkfs.minix fsck.minix hexdump setsid chrt last logger mesg renice wall vipw vigr chfn newgrp chsh login; do
 		update-alternatives --remove $i $i.${PN}
 	done
 }
 
+pkg_postinst_util-linux-ng-reset() {
+	update-alternatives --install ${bindir}/reset reset reset.${PN} 100
+}
+
+pkg_prerm_util-linux-ng-reset () {
+	update-alternatives --remove reset reset.${PN}
+}
+
 pkg_postinst_util-linux-ng-fdisk () {
 	update-alternatives --install ${base_sbindir}/fdisk fdisk fdisk.${PN} 100
 }
-- 
1.6.3.3




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] util-linux-ng: remove reset
  2010-09-13 11:17 ` [PATCH] util-linux-ng: reset rdepends on ncurses-tools Eric Bénard
@ 2010-09-13 11:17   ` Eric Bénard
  2010-09-13 16:41     ` Frans Meulenbroeks
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Bénard @ 2010-09-13 11:17 UTC (permalink / raw)
  To: openembedded-devel

* reset is a script using tput so it rdepends on ncurses-tools
  which also provided reset
* prefer using the original and remove util-linux-ng's reset

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 recipes/util-linux-ng/util-linux-ng.inc |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/recipes/util-linux-ng/util-linux-ng.inc b/recipes/util-linux-ng/util-linux-ng.inc
index a829b08..b9dbd7c 100644
--- a/recipes/util-linux-ng/util-linux-ng.inc
+++ b/recipes/util-linux-ng/util-linux-ng.inc
@@ -8,7 +8,7 @@ inherit autotools gettext
 
 DEFAULT_PREFERENCE = "-1"
 
-INC_PR = "r29"
+INC_PR = "r30"
 
 # allows for a release candidate
 RC ?= ""
@@ -69,7 +69,7 @@ EXTRA_OECONF = "--disable-use-tty-group --disable-makeinstall-chown \
 --enable-kill --enable-last --enable-mesg --enable-raw --enable-login-utils \
 --enable-arch --enable-init --enable-partx --enable-schedutils \
 --with-fsprobe=builtin --enable-libuuid --enable-libblkid \
---enable-fsck --enable-reset"
+--enable-fsck"
 
 LDFLAGS_append_libc-uclibc = "${@['',' -lintl'][bb.data.getVar('USE_NLS', d, 1) == 'yes']}"
 LDFLAGS_virtclass-native = "${BUILD_LDFLAGS}"
@@ -125,7 +125,7 @@ do_install () {
 
         sbinprogs="agetty blockdev ctrlaltdel cfdisk"
         sbinprogs_a="pivot_root hwclock mkswap shutdown mkfs.minix fsck.minix losetup swapon fdisk fsck blkid vigr vipw"
-        usrbinprogs_a="chfn chsh hexdump last logger mesg newgrp renice wall setsid chrt reset"
+        usrbinprogs_a="chfn chsh hexdump last logger mesg newgrp renice wall setsid chrt"
         usrsbinprogs_a="readprofile"
         binprogs_a="dmesg kill more umount mount login"
 
@@ -214,7 +214,6 @@ pkg_postinst_${PN} () {
 	update-alternatives --install ${base_bindir}/login login login.${PN} 100
 	update-alternatives --install ${base_sbindir}/vipw vipw vipw.${PN} 100
 	update-alternatives --install ${base_sbindir}/vigr vigr vigr.${PN} 100
-	update-alternatives --install ${bindir}/reset reset reset.${PN} 100
 	update-alternatives --install ${bindir}/setsid setsid setsid.${PN} 100
 	update-alternatives --install ${bindir}/chrt chrt chrt.${PN} 100
 	
@@ -230,7 +229,7 @@ pkg_prerm_${PN} () {
 	test -x ${base_sbindir}/pivot_root.${PN} && \
 	update-alternatives --remove pivot_root pivot_root.${PN}
 
-	for i in dmesg kill more halt hwclock mkswap reboot shutdown sln mkfs.minix fsck.minix hexdump setsid chrt last logger mesg renice wall vipw vigr chfn newgrp chsh login reset; do
+	for i in dmesg kill more halt hwclock mkswap reboot shutdown sln mkfs.minix fsck.minix hexdump setsid chrt last logger mesg renice wall vipw vigr chfn newgrp chsh login; do
 		update-alternatives --remove $i $i.${PN}
 	done
 }
-- 
1.6.3.3




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] util-linux-ng: remove reset
  2010-09-13 11:17   ` [PATCH] util-linux-ng: remove reset Eric Bénard
@ 2010-09-13 16:41     ` Frans Meulenbroeks
  2010-09-14  6:04       ` Steffen Sledz
  0 siblings, 1 reply; 6+ messages in thread
From: Frans Meulenbroeks @ 2010-09-13 16:41 UTC (permalink / raw)
  To: openembedded-devel

2010/9/13 Eric Bénard <eric@eukrea.com>:
> * reset is a script using tput so it rdepends on ncurses-tools
>  which also provided reset
> * prefer using the original and remove util-linux-ng's reset
>
> Signed-off-by: Eric Bénard <eric@eukrea.com>

If they are functionally identical I have a slight preference for
removing it and use the original.
No strong feelings on it though.

Frans



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] util-linux-ng: remove reset
  2010-09-13 16:41     ` Frans Meulenbroeks
@ 2010-09-14  6:04       ` Steffen Sledz
  2010-09-14 19:57         ` Eric Bénard
  0 siblings, 1 reply; 6+ messages in thread
From: Steffen Sledz @ 2010-09-14  6:04 UTC (permalink / raw)
  To: openembedded-devel

Am 13.09.2010 18:41, schrieb Frans Meulenbroeks:
> 2010/9/13 Eric Bénard <eric@eukrea.com>:
>> * reset is a script using tput so it rdepends on ncurses-tools
>>  which also provided reset
>> * prefer using the original and remove util-linux-ng's reset
>>
>> Signed-off-by: Eric Bénard <eric@eukrea.com>
> 
> If they are functionally identical I have a slight preference for
> removing it and use the original.
> No strong feelings on it though.

What about update-alternatives?

Steffen




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] util-linux-ng: remove reset
  2010-09-14  6:04       ` Steffen Sledz
@ 2010-09-14 19:57         ` Eric Bénard
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Bénard @ 2010-09-14 19:57 UTC (permalink / raw)
  To: openembedded-devel

Hi,

Le 14/09/2010 08:04, Steffen Sledz a écrit :
> Am 13.09.2010 18:41, schrieb Frans Meulenbroeks:
>> 2010/9/13 Eric Bénard<eric@eukrea.com>:
>>> * reset is a script using tput so it rdepends on ncurses-tools
>>>   which also provided reset
>>> * prefer using the original and remove util-linux-ng's reset
>>>
>>> Signed-off-by: Eric Bénard<eric@eukrea.com>
>>
>> If they are functionally identical I have a slight preference for
>> removing it and use the original.
>> No strong feelings on it though.
>
> What about update-alternatives?

is it an ack for the first patch ?
http://lists.linuxtogo.org/pipermail/openembedded-devel/2010-September/024167.html

Thanks,
Eric



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-09-14 19:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-13 11:15 util-linux-ng: handle reset problem Eric Bénard
2010-09-13 11:17 ` [PATCH] util-linux-ng: reset rdepends on ncurses-tools Eric Bénard
2010-09-13 11:17   ` [PATCH] util-linux-ng: remove reset Eric Bénard
2010-09-13 16:41     ` Frans Meulenbroeks
2010-09-14  6:04       ` Steffen Sledz
2010-09-14 19:57         ` Eric Bénard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.