From f073884983b917af15368437b0cf473ebadc4acc Mon Sep 17 00:00:00 2001 From: Johnny Hughes Date: Dec 11 2019 15:27:27 +0000 Subject: fix ppc64le exported-sql-viewer --- diff --git a/SOURCES/centos-fix-exported-sql-viewer.patch b/SOURCES/centos-fix-exported-sql-viewer.patch new file mode 100644 index 0000000..3b527cb --- /dev/null +++ b/SOURCES/centos-fix-exported-sql-viewer.patch @@ -0,0 +1,48 @@ +diff -aurp a/tools/perf/scripts/python/exported-sql-viewer.py b/tools/perf/scripts/python/exported-sql-viewer.py +--- a/tools/perf/scripts/python/exported-sql-viewer.py 2019-11-11 12:17:42.000000000 +0000 ++++ b/tools/perf/scripts/python/exported-sql-viewer.py 2019-12-10 18:16:19.027985531 +0000 +@@ -1573,7 +1573,7 @@ class SQLTableDialogDataItem(): + return str(lower_id) + + def ConvertRelativeTime(self, val): +- print "val ", val ++ print("val ", val) + mult = 1 + suffix = val[-2:] + if suffix == "ms": +@@ -1595,29 +1595,29 @@ class SQLTableDialogDataItem(): + return str(val) + + def ConvertTimeRange(self, vrange): +- print "vrange ", vrange ++ print("vrange ", vrange) + if vrange[0] == "": + vrange[0] = str(self.first_time) + if vrange[1] == "": + vrange[1] = str(self.last_time) + vrange[0] = self.ConvertRelativeTime(vrange[0]) + vrange[1] = self.ConvertRelativeTime(vrange[1]) +- print "vrange2 ", vrange ++ print("vrange2 ", vrange) + if not self.IsNumber(vrange[0]) or not self.IsNumber(vrange[1]): + return False +- print "ok1" ++ print("ok1") + beg_range = max(int(vrange[0]), self.first_time) + end_range = min(int(vrange[1]), self.last_time) + if beg_range > self.last_time or end_range < self.first_time: + return False +- print "ok2" ++ print("ok2") + vrange[0] = self.BinarySearchTime(0, self.last_id, beg_range, True) + vrange[1] = self.BinarySearchTime(1, self.last_id + 1, end_range, False) +- print "vrange3 ", vrange ++ print("vrange3 ", vrange) + return True + + def AddTimeRange(self, value, ranges): +- print "value ", value ++ print("value ", value) + n = value.count("-") + if n == 1: + pass diff --git a/SPECS/kernel.spec b/SPECS/kernel.spec index fb347a7..afc943f 100644 --- a/SPECS/kernel.spec +++ b/SPECS/kernel.spec @@ -495,6 +495,7 @@ Source9000: centos.pem Patch1000: debrand-single-cpu.patch Patch1001: debrand-rh_taint.patch #Patch1002: debrand-rh-i686-cpu.patch +Patch1003: centos-fix-exported-sql-viewer.patch # empty final patch to facilitate testing of kernel patches Patch999999: linux-kernel-test.patch @@ -1052,6 +1053,7 @@ ApplyOptionalPatch debrand-rh_taint.patch #ApplyOptionalPatch debrand-rh-i686-cpu.patch %if 0%{?rhel} == 7 +ApplyOptionalPatch centos-fix-exported-sql-viewer.patch sed -i 's/strip_size=.*/strip_size=$(stat -c %s $vmz.$$)/g' arch/powerpc/boot/wrapper %endif