summaryrefslogtreecommitdiffstats
path: root/qml/mageiawelcome.py
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2021-04-03 22:50:24 +0200
committerPapoteur <papoteur@mageia.org>2021-04-04 14:40:00 +0200
commit744c8a7cb9c0e57c6f9ce8edb92c109ad4af1ecf (patch)
treeca59a2fdc4b45dd4bdb915f63c7cfff3ebbe2ac2 /qml/mageiawelcome.py
parent0ef2054446ef504cbd15b4a4b699742cb23db0ad (diff)
downloadmageiawelcome-744c8a7cb9c0e57c6f9ce8edb92c109ad4af1ecf.tar
mageiawelcome-744c8a7cb9c0e57c6f9ce8edb92c109ad4af1ecf.tar.gz
mageiawelcome-744c8a7cb9c0e57c6f9ce8edb92c109ad4af1ecf.tar.bz2
mageiawelcome-744c8a7cb9c0e57c6f9ce8edb92c109ad4af1ecf.tar.xz
mageiawelcome-744c8a7cb9c0e57c6f9ce8edb92c109ad4af1ecf.zip
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).
Diffstat (limited to 'qml/mageiawelcome.py')
-rw-r--r--qml/mageiawelcome.py27
1 files changed, 22 insertions, 5 deletions
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]])