From 8f33fa7a49b4c60564309f356a37f2a1dfe20c34 Mon Sep 17 00:00:00 2001 From: "Eugene V. Lyubimkin" Date: Sun, 29 Mar 2009 22:37:49 +0300 Subject: Imported Debian patch 0.8.1-6 --- debian/changelog | 11 +++++++++++ debian/patches/110-upstream-fix-page-size-on-BSD.patch | 17 +++++++++++++++-- debian/rules | 1 + 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 980ecca..78ecd0b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +htop (0.8.1-6) unstable; urgency=low + + * debian/patches: + - debian/patches/110-upstream-fix-page-size-on-BSD.patch was accidentally + incorrectly applied, causing zeroes in memory columns. Fixed. + * debian/rules: + - File Process.c somewhy is not regenerated during normal build process. + Regenerate it by hand. + + -- Eugene V. Lyubimkin Sun, 29 Mar 2009 22:37:49 +0300 + htop (0.8.1-5) unstable; urgency=low * debian/patches: diff --git a/debian/patches/110-upstream-fix-page-size-on-BSD.patch b/debian/patches/110-upstream-fix-page-size-on-BSD.patch index e73fcb2..1161200 100644 --- a/debian/patches/110-upstream-fix-page-size-on-BSD.patch +++ b/debian/patches/110-upstream-fix-page-size-on-BSD.patch @@ -1,8 +1,8 @@ Fix page size on BSD systems. Index: htop/Process.c =================================================================== ---- htop.orig/Process.c 2009-03-29 20:03:00.601034016 +0300 -+++ htop/Process.c 2009-03-29 20:03:56.029033456 +0300 +--- htop.orig/Process.c 2009-03-29 22:51:01.865040249 +0300 ++++ htop/Process.c 2009-03-29 22:51:02.933034296 +0300 @@ -33,8 +33,9 @@ // This works only with glibc 2.1+. On earlier versions // the behavior is similar to have a hardcoded page size. @@ -35,3 +35,16 @@ Index: htop/Process.c case ST_UID: snprintf(buffer, n, "%4d ", this->st_uid); break; case USER: { if (Process_getuid != this->st_uid) +Index: htop/ProcessList.c +=================================================================== +--- htop.orig/ProcessList.c 2009-03-29 22:48:20.445032821 +0300 ++++ htop/ProcessList.c 2009-03-29 22:51:02.933034296 +0300 +@@ -698,7 +698,7 @@ + period * 100.0; + process->percent_cpu = MAX(MIN(percent_cpu, processors*100.0), 0.0); + +- process->percent_mem = (process->m_resident * PAGE_SIZE) / ++ process->percent_mem = (process->m_resident * PAGE_SIZE_KB) / + (float)(this->totalMem) * + 100.0; + diff --git a/debian/rules b/debian/rules index ded1648..7b99d4d 100755 --- a/debian/rules +++ b/debian/rules @@ -20,6 +20,7 @@ config.status: configure $(QUILT_STAMPFN) build: build-stamp build-stamp: config.status + scripts/MakeHeader.py Process.c dh build --before dh_auto_configure dh build --after dh_auto_configure touch build-stamp -- cgit v1.2.3