aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Schmaus <flo@geekplace.eu>2021-05-03 19:38:32 +0200
committerFlorian Schmaus <flo@geekplace.eu>2021-05-03 19:39:02 +0200
commite9d4c62de50eb59dcd7c0f6aee4376e839af6e0c (patch)
tree6b1a4700c3bf0faa8ed6e90da7d42c7ca0628b97 /sys-apps
parentwww-servers/thin: fix failing tests and flags (diff)
downloadguru-e9d4c62de50eb59dcd7c0f6aee4376e839af6e0c.tar.gz
guru-e9d4c62de50eb59dcd7c0f6aee4376e839af6e0c.tar.bz2
guru-e9d4c62de50eb59dcd7c0f6aee4376e839af6e0c.zip
sys-apps/dool: fix KeyError in dool_disk_avgqu.py
Closes: https://bugs.gentoo.org/784704 Signed-off-by: Florian Schmaus <flo@geekplace.eu>
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/dool/dool-0.8_pre20191010-r1.ebuild (renamed from sys-apps/dool/dool-0.8_pre20191010.ebuild)4
-rw-r--r--sys-apps/dool/dool-9999.ebuild4
-rw-r--r--sys-apps/dool/files/0001-Key-for-key-in-dool_disk_avgqu.py-to-avoid-KeyError.patch43
3 files changed, 51 insertions, 0 deletions
diff --git a/sys-apps/dool/dool-0.8_pre20191010.ebuild b/sys-apps/dool/dool-0.8_pre20191010-r1.ebuild
index ae22099fd..92ce074f9 100644
--- a/sys-apps/dool/dool-0.8_pre20191010.ebuild
+++ b/sys-apps/dool/dool-0.8_pre20191010-r1.ebuild
@@ -31,6 +31,10 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="${PYTHON_DEPS}"
DEPEND="${RDEPEND}"
+PATCHES=(
+ "${FILESDIR}/0001-Key-for-key-in-dool_disk_avgqu.py-to-avoid-KeyError.patch"
+)
+
src_compile() {
:
}
diff --git a/sys-apps/dool/dool-9999.ebuild b/sys-apps/dool/dool-9999.ebuild
index ae22099fd..92ce074f9 100644
--- a/sys-apps/dool/dool-9999.ebuild
+++ b/sys-apps/dool/dool-9999.ebuild
@@ -31,6 +31,10 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="${PYTHON_DEPS}"
DEPEND="${RDEPEND}"
+PATCHES=(
+ "${FILESDIR}/0001-Key-for-key-in-dool_disk_avgqu.py-to-avoid-KeyError.patch"
+)
+
src_compile() {
:
}
diff --git a/sys-apps/dool/files/0001-Key-for-key-in-dool_disk_avgqu.py-to-avoid-KeyError.patch b/sys-apps/dool/files/0001-Key-for-key-in-dool_disk_avgqu.py-to-avoid-KeyError.patch
new file mode 100644
index 000000000..05db73907
--- /dev/null
+++ b/sys-apps/dool/files/0001-Key-for-key-in-dool_disk_avgqu.py-to-avoid-KeyError.patch
@@ -0,0 +1,43 @@
+From 67b58a3e453d6a7b9c225c1f210e20fe2605908a Mon Sep 17 00:00:00 2001
+From: Florian Schmaus <flo@geekplace.eu>
+Date: Mon, 3 May 2021 19:34:41 +0200
+Subject: [PATCH] Key for key in dool_disk_avgqu.py to avoid KeyError
+
+Running "make test" may fail with:
+
+Traceback (most recent call last):
+ File "./dool", line 2899, in <module>
+ main()
+ File "./dool", line 2751, in main
+ scheduler.run()
+ File "/usr/lib/python3.7/sched.py", line 151, in run
+ action(*argument, **kwargs)
+ File "./dool", line 2847, in perform
+ o.extract()
+ File "<string>", line 63, in extract
+KeyError: 'rq_ticks'
+make: *** [Makefile:38: test] Error 1
+
+See https://bugs.gentoo.org/784704
+---
+ plugins/dool_disk_avgqu.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/plugins/dool_disk_avgqu.py b/plugins/dool_disk_avgqu.py
+index 5da8d4666d5c..bc421a82028a 100644
+--- a/plugins/dool_disk_avgqu.py
++++ b/plugins/dool_disk_avgqu.py
+@@ -60,6 +60,10 @@ class dstat_plugin(dstat):
+ )
+
+ for name in self.vars:
++ # Avoid KeyError: 'rq_ticks'
++ # See https://bugs.gentoo.org/784704
++ if 'rq_ticks' not in self.set1[name] or 'rq_ticks' not in self.set2[name]:
++ continue
+ self.val[name] = ( ( self.set2[name]['rq_ticks'] - self.set1[name]['rq_ticks'] ) * 1.0 / elapsed / 1000, )
+
+ if step == op.delay:
+--
+2.30.2
+