Patchwork [CONSOLIDATED,PULL,083/113] procps: raise update-alternatives priority

login
register
mail settings
Submitter Saul Wold
Date Jan. 3, 2012, 6:20 a.m.
Message ID <abb5741c7b17832f1181b78ba3d03c070cab6304.1325571069.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/18153/
State New
Headers show

Comments

Saul Wold - Jan. 3, 2012, 6:20 a.m.
From: Koen Kooi <koen@dominion.thruhere.net>

This fixes a problem with the uptime utility:

root@beagleboneA3-0088:/var/lib/cloud9# busybox uptime
 16:00:17 up 2 days,  6:46,  load average: 0.14, 0.04, 0.05
root@beagleboneA3-0088:/var/lib/cloud9# uptime.procps
 16:00:22 up 2 days,  6:46,  1 user,  load average: 0.14, 0.05, 0.06
root@beagleboneA3-0088:/var/lib/cloud9# uptime.coreutils
 16:00pm  up 4382 days 15:58,  1 user,  load average: 0.13, 0.05, 0.05
root@beagleboneA3-0088:/var/lib/cloud9# ls /usr/bin/uptime -la
lrwxrwxrwx 1 root root 16 Dec 26 08:56 /usr/bin/uptime -> uptime.coreutils

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
 meta/recipes-extended/procps/procps_3.2.8.bb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Phil Blundell - Jan. 3, 2012, 12:50 p.m.
On Mon, 2012-01-02 at 22:20 -0800, Saul Wold wrote:
> From: Koen Kooi <koen@dominion.thruhere.net>
> 
> This fixes a problem with the uptime utility:
> 
> root@beagleboneA3-0088:/var/lib/cloud9# busybox uptime
>  16:00:17 up 2 days,  6:46,  load average: 0.14, 0.04, 0.05
> root@beagleboneA3-0088:/var/lib/cloud9# uptime.procps
>  16:00:22 up 2 days,  6:46,  1 user,  load average: 0.14, 0.05, 0.06
> root@beagleboneA3-0088:/var/lib/cloud9# uptime.coreutils
>  16:00pm  up 4382 days 15:58,  1 user,  load average: 0.13, 0.05, 0.05
> root@beagleboneA3-0088:/var/lib/cloud9# ls /usr/bin/uptime -la
> lrwxrwxrwx 1 root root 16 Dec 26 08:56 /usr/bin/uptime -> uptime.coreutils

If the coreutils uptime is broken (and assuming it isn't straightforward
to fix) then I would have thought the right thing would be to reduce the
priority of that one alternative rather than increasing all the others
to be higher.  Or just stop coreutils shipping uptime altogether I
suppose.  But, anyway, patching procps to work around a bug in coreutils
seems like the wrong thing.

p.

Patch

diff --git a/meta/recipes-extended/procps/procps_3.2.8.bb b/meta/recipes-extended/procps/procps_3.2.8.bb
index d989955..6a41ccd 100644
--- a/meta/recipes-extended/procps/procps_3.2.8.bb
+++ b/meta/recipes-extended/procps/procps_3.2.8.bb
@@ -1,12 +1,12 @@ 
 require procps.inc
 
-PR = "r3"
+PR = "r4"
 
 inherit update-alternatives
 
 ALTERNATIVE_LINKS = "${bindir}/top ${bindir}/uptime ${bindir}/free ${bindir}/pkill ${bindir}/pmap \
                      ${base_bindir}/kill ${base_sbindir}/sysctl ${base_bindir}/ps"
-ALTERNATIVE_PRIORITY = "90"
+ALTERNATIVE_PRIORITY = "110"
 
 SRC_URI += "file://procmodule.patch \
             file://psmodule.patch \