pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/htop htop: workaround differences in how linu...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ff3bc0aa150a
branches:  trunk
changeset: 371882:ff3bc0aa150a
user:      maya <maya%pkgsrc.org@localhost>
date:      Fri Nov 24 02:06:13 2017 +0000

description:
htop: workaround differences in how linux and netbsd count memory usage

a bogus value is displayed for used memory as usedMem ends up as a negative
quantity. use (total memory - free memory) instead.

PR pkg/52669: htop displays wrong used memory

diffstat:

 sysutils/htop/Makefile                       |   3 ++-
 sysutils/htop/distinfo                       |   3 ++-
 sysutils/htop/patches/patch-linux_Platform.c |  18 ++++++++++++++++++
 3 files changed, 22 insertions(+), 2 deletions(-)

diffs (50 lines):

diff -r 1ee2a3c8fad9 -r ff3bc0aa150a sysutils/htop/Makefile
--- a/sysutils/htop/Makefile    Thu Nov 23 22:42:04 2017 +0000
+++ b/sysutils/htop/Makefile    Fri Nov 24 02:06:13 2017 +0000
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.15 2017/01/31 22:24:28 maya Exp $
+# $NetBSD: Makefile,v 1.16 2017/11/24 02:06:13 maya Exp $
 
 DISTNAME=      htop-2.0.2
 CATEGORIES=    sysutils
 MASTER_SITES=  http://hisham.hm/htop/releases/${PKGVERSION_NOREV}/
+PKGREVISION=   1
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=      http://hisham.hm/htop/
diff -r 1ee2a3c8fad9 -r ff3bc0aa150a sysutils/htop/distinfo
--- a/sysutils/htop/distinfo    Thu Nov 23 22:42:04 2017 +0000
+++ b/sysutils/htop/distinfo    Fri Nov 24 02:06:13 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.10 2017/03/25 10:53:59 maya Exp $
+$NetBSD: distinfo,v 1.11 2017/11/24 02:06:13 maya Exp $
 
 SHA1 (htop-2.0.2.tar.gz) = 201f793f13dce2448e36047079875b9bd5bba75a
 RMD160 (htop-2.0.2.tar.gz) = af17b9f7e1744e2db4d6a28c95cdfb9536343786
@@ -6,3 +6,4 @@
 Size (htop-2.0.2.tar.gz) = 476364 bytes
 SHA1 (patch-TraceScreen.c) = 85f9e26c9a2ddf1e1b4df7010194a43bf622b2ea
 SHA1 (patch-configure.ac) = 87557f0b0027462f244cd0c9e14739d10bbfc010
+SHA1 (patch-linux_Platform.c) = d37f4f5116023fa8d8f58f6b925e4f86e9748cea
diff -r 1ee2a3c8fad9 -r ff3bc0aa150a sysutils/htop/patches/patch-linux_Platform.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/htop/patches/patch-linux_Platform.c      Fri Nov 24 02:06:13 2017 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-linux_Platform.c,v 1.1 2017/11/24 02:06:13 maya Exp $
+
+Workaround differences in counting memory netbsd vs. linux.
+PR 52669 - a bogus value is displayed for used memory because this
+quantity becomes negative.
+
+--- linux/Platform.c.orig      2016-02-02 14:58:45.000000000 +0000
++++ linux/Platform.c
+@@ -200,7 +200,9 @@ void Platform_setMemoryValues(Meter* thi
+    long int usedMem = pl->usedMem;
+    long int buffersMem = pl->buffersMem;
+    long int cachedMem = pl->cachedMem;
++#ifndef __NetBSD__
+    usedMem -= buffersMem + cachedMem;
++#endif
+    this->total = pl->totalMem;
+    this->values[0] = usedMem;
+    this->values[1] = buffersMem;



Home | Main Index | Thread Index | Old Index