From 744c8a7cb9c0e57c6f9ce8edb92c109ad4af1ecf Mon Sep 17 00:00:00 2001 From: Papoteur Date: Sat, 3 Apr 2021 22:50:24 +0200 Subject: Give a message that some repositories have to be active for installation of application add a special case for Steam which needs 32bit repositories (mga#28328). --- qml/mageiawelcome.py | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'qml/mageiawelcome.py') diff --git a/qml/mageiawelcome.py b/qml/mageiawelcome.py index 4a38592..c4079a8 100644 --- a/qml/mageiawelcome.py +++ b/qml/mageiawelcome.py @@ -110,7 +110,7 @@ class Callbrowser(QObject): class Launcher(QObject): installed = pyqtSignal() - tainted = pyqtSignal() + needed = pyqtSignal(str, arguments=['repo']) repo = pyqtSignal() noprogram = pyqtSignal() @@ -130,6 +130,10 @@ class Launcher(QObject): updates = False tainted = False t_updates = False + nonfree = False + nf_updates = False + core32 = False + core32_updates = False try: active = subprocess.run(['urpmq','--list-media','active'], capture_output=True, text=True) active.check_returncode() @@ -145,15 +149,28 @@ class Launcher(QObject): tainted = True if line.startswith('Tainted Updates'): t_updates = True + if line.startswith('Nonfree Release'): + nonfree = True + if line.startswith('Nonfree Updates'): + nf_updates = True + if line.startswith('Core 32bit Release'): + core32 = True + if line.startswith('Core 32bit Updates'): + core32_updates = True if repo == 'tainted' and not (tainted and t_updates) : + # repo tainted not enabled + self.needed.emit(repo) + return + if repo == 'non-free' and not (nonfree and nf_updates) : + # repo nonfree not enabled + self.needed.emit(repo) + return + if repo == 'steam' and not (core32 and core32_updates and nonfree and nf_updates) : # repo not enabled - # print("Tainted not active") - self.tainted.emit() + self.needed.emit(repo) return - if repo == '' and not (core and updates) : # repo not enabled - # print("Core not active") self.repo.emit() return proc = subprocess.Popen(['gurpmi',cmd[1]]) -- cgit v1.2.1