From b800eaa1ac6860d59c6a8438a4367aefbafca842 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sat, 14 May 2016 22:33:53 +0200 Subject: [PATCH] sys-process/ctop: bump to 1.0.0 --- ...p-0.4.1.exheres-0 => ctop-1.0.0.exheres-0} | 6 --- .../ctop/files/ctop-0.4.1-blkio.patch | 38 ------------------- .../ctop/files/ctop-0.4.1-rel-paths.patch | 27 ------------- 3 files changed, 71 deletions(-) rename packages/sys-process/ctop/{ctop-0.4.1.exheres-0 => ctop-1.0.0.exheres-0} (76%) delete mode 100644 packages/sys-process/ctop/files/ctop-0.4.1-blkio.patch delete mode 100644 packages/sys-process/ctop/files/ctop-0.4.1-rel-paths.patch diff --git a/packages/sys-process/ctop/ctop-0.4.1.exheres-0 b/packages/sys-process/ctop/ctop-1.0.0.exheres-0 similarity index 76% rename from packages/sys-process/ctop/ctop-0.4.1.exheres-0 rename to packages/sys-process/ctop/ctop-1.0.0.exheres-0 index 6494e6b7..7b3ff8db 100644 --- a/packages/sys-process/ctop/ctop-0.4.1.exheres-0 +++ b/packages/sys-process/ctop/ctop-1.0.0.exheres-0 @@ -12,9 +12,3 @@ SLOT="0" PLATFORMS="~amd64 ~x86" MYOPTIONS="" -# upstream backports -DEFAULT_SRC_PREPARE_PATCHES=( - "${FILES}"/${PNV}-rel-paths.patch - "${FILES}"/${PNV}-blkio.patch -) - diff --git a/packages/sys-process/ctop/files/ctop-0.4.1-blkio.patch b/packages/sys-process/ctop/files/ctop-0.4.1-blkio.patch deleted file mode 100644 index d448fe27..00000000 --- a/packages/sys-process/ctop/files/ctop-0.4.1-blkio.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 093d4c2b604f6e94d01420c0937d5fe574c49a40 Mon Sep 17 00:00:00 2001 -From: Jean-Tiare Le Bigot -Date: Tue, 19 Jan 2016 08:36:07 +0100 -Subject: [PATCH] workaround broken blkio on some system. Fixes #15 - ---- - cgroup_top.py | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/cgroup_top.py b/cgroup_top.py -index fece4a6..8bbb8f0 100755 ---- a/cgroup_top.py -+++ b/cgroup_top.py -@@ -26,6 +26,7 @@ - import pwd - import time - import pty -+import errno - import subprocess - import multiprocessing - -@@ -346,8 +347,14 @@ def collect(measures): - collect_ensure_common(cur[cgroup.name], cgroup) - - # Collect BlockIO stats -- cur[cgroup.name]['blkio.throttle.io_service_bytes'] = cgroup['blkio.throttle.io_service_bytes'] -- cur[cgroup.name]['blkio.throttle.io_service_bytes.diff'] = {'total':0} -+ try: -+ cur[cgroup.name]['blkio.throttle.io_service_bytes'] = cgroup['blkio.throttle.io_service_bytes'] -+ cur[cgroup.name]['blkio.throttle.io_service_bytes.diff'] = {'total':0} -+ except IOError as e: -+ # Workaround broken systems (see #15) -+ if e.errno == errno.ENOENT: -+ continue -+ raise - - # Collect BlockIO increase on run > 1 - if cgroup.name in prev: diff --git a/packages/sys-process/ctop/files/ctop-0.4.1-rel-paths.patch b/packages/sys-process/ctop/files/ctop-0.4.1-rel-paths.patch deleted file mode 100644 index a095c89d..00000000 --- a/packages/sys-process/ctop/files/ctop-0.4.1-rel-paths.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 180b94124cc17afa60cd9126fee2e004a26c43f2 Mon Sep 17 00:00:00 2001 -From: Jean-Tiare Le Bigot -Date: Fri, 15 May 2015 22:21:26 +0200 -Subject: [PATCH] fix #7: use relative path to which - -Signed-off-by: Jean-Tiare Le Bigot ---- - CHANGELOG | 1 + - cgroup_top.py | 5 ++++- - 2 files changed, 5 insertions(+), 1 deletion(-) - -diff --git a/cgroup_top.py b/cgroup_top.py -index f073518..6a1ea66 100755 ---- a/cgroup_top.py -+++ b/cgroup_top.py -@@ -41,7 +41,10 @@ - sys.exit(0) - - def cmd_exists(cmd): -- return subprocess.call(["/bin/which", cmd], stdout=subprocess.PIPE, stderr=subprocess.PIPE) == 0 -+ try: -+ return subprocess.call(["which", cmd], stdout=subprocess.PIPE, stderr=subprocess.PIPE) == 0 -+ except OSError: -+ return False - - HAS_LXC = cmd_exists('lxc-start') - HAS_DOCKER = cmd_exists('docker')