commit 697c970fcce1b6523ac61c26b5bc62c2364bec23 Author: Jacek Konieczny <jaj...@jajcus.net> Date: Sat Jan 19 19:55:27 2019 +0100
fix kernel check to work with PLD rt kernel Cadence.spec | 4 +++- kernel_check.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) --- diff --git a/Cadence.spec b/Cadence.spec index 5a78d7b..f94ce02 100644 --- a/Cadence.spec +++ b/Cadence.spec @@ -1,12 +1,13 @@ Summary: Set of tools useful for audio production Name: Cadence Version: 0.9.0 -Release: 1 +Release: 2 License: GPL v2+ Group: Applications Source0: https://github.com/falkTX/Cadence/archive/v0.9.0/%{name}-%{version}.tar.gz # Source0-md5: 3031db18be95c62a758c2793498549a7 Patch0: libdir.patch +Patch1: kernel_check.patch URL: http://kxstudio.linuxaudio.org/Applications:Cadence BuildRequires: jack-audio-connection-kit-devel BuildRequires: python-PyQt5-devel-tools @@ -56,6 +57,7 @@ Cadence is a set of tools useful for audio production. %setup -q %patch0 -p1 +%patch1 -p1 sed -i -e 's@^LIBDIR = .*@LIBDIR = "%{_libdir}"@' src/shared_cadence.py %build diff --git a/kernel_check.patch b/kernel_check.patch new file mode 100644 index 0000000..ffcadcc --- /dev/null +++ b/kernel_check.patch @@ -0,0 +1,44 @@ +diff -dur -x '*~' Cadence-0.9.0.orig/src/cadence.py Cadence-0.9.0/src/cadence.py +--- Cadence-0.9.0.orig/src/cadence.py 2018-03-22 00:58:48.000000000 +0100 ++++ Cadence-0.9.0/src/cadence.py 2019-01-19 19:51:19.151840612 +0100 +@@ -28,6 +28,8 @@ + from PyQt4.QtCore import QFileSystemWatcher, QThread, QSemaphore + from PyQt4.QtGui import QApplication, QDialogButtonBox, QLabel, QMainWindow, QSizePolicy + ++import re ++ + # ------------------------------------------------------------------------------------------------------------ + # Imports (Custom Stuff) + +@@ -475,7 +477,9 @@ + + self.name = self.tr("Current kernel") + +- uname3 = os.uname()[2] ++ uname3, uname4 = os.uname()[2:4] ++ ++ uname4_match = re.match(r"^\#\d+ ((?:[A-Z]{2,} )*)[A-Z][a-z]", uname4) + + versionInt = [] + versionStr = uname3.split("-",1)[0] +@@ -490,7 +494,19 @@ + + self.result = versionStr + " " + +- if "-" not in uname3: ++ if uname4_match: ++ kernelType = uname4_match.group(1) ++ self.result += kernelType ++ if "PREEMPT RT" in kernelType: ++ self.icon = self.ICON_OK ++ self.moreInfo = None ++ elif "PREEMPT" in kernelType: ++ self.icon = self.ICON_WARN ++ self.moreInfo = None ++ else: ++ self.icon = self.ICON_ERROR ++ self.moreInfo = None ++ elif "-" not in uname3: + self.icon = self.ICON_WARN + self.result += self.tr("Vanilla") + self.moreInfo = None ================================================================ ---- gitweb: http://git.pld-linux.org/gitweb.cgi/packages/Cadence.git/commitdiff/697c970fcce1b6523ac61c26b5bc62c2364bec23 _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit