summaryrefslogtreecommitdiffstats
path: root/qml/mageiawelcome.py
diff options
context:
space:
mode:
Diffstat (limited to 'qml/mageiawelcome.py')
-rw-r--r--qml/mageiawelcome.py114
1 files changed, 57 insertions, 57 deletions
diff --git a/qml/mageiawelcome.py b/qml/mageiawelcome.py
index 29d0358..f768df3 100644
--- a/qml/mageiawelcome.py
+++ b/qml/mageiawelcome.py
@@ -133,64 +133,64 @@ class Launcher(QObject):
@pyqtSlot(QVariant)
def install(self, app):
if app.isArray():
- cmd = []
- # app should contain package, repository
- for i in range(0,app.property("length").toInt()):
- cmd.append(app.property(i).toString())
- repo = cmd[1]
- # Check if repositories are enabled
- core = False
- 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()
- except subprocess.CalledProcessError:
- print("Error with urpmq")
- return
- for line in active.stdout.splitlines():
- if line.startswith('Core Release'):
- core = True
- if line.startswith('Core Updates'):
- updates = True
- if line.startswith('Tainted Release'):
- 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
- self.needed.emit(repo)
- return
- if repo == '' and not (core and updates) :
- # repo not enabled
- self.repo.emit()
- return
- proc = subprocess.Popen(['/usr/bin/gurpmi',cmd[0]])
- proc.wait()
- # Give the signal to reload the applist
- self.installed.emit()
+ cmd = []
+ # app should contain package, repository
+ for i in range(0,app.property("length").toInt()):
+ cmd.append(app.property(i).toString())
+ repo = cmd[1]
+ # Check if repositories are enabled
+ core = False
+ 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()
+ except subprocess.CalledProcessError:
+ print("Error with urpmq")
+ return
+ for line in active.stdout.splitlines():
+ if line.startswith('Core Release'):
+ core = True
+ if line.startswith('Core Updates'):
+ updates = True
+ if line.startswith('Tainted Release'):
+ 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
+ self.needed.emit(repo)
+ return
+ if repo == '' and not (core and updates) :
+ # repo not enabled
+ self.repo.emit()
return
+ proc = subprocess.Popen(['/usr/bin/gurpmi',cmd[0]])
+ proc.wait()
+ # Give the signal to reload the applist
+ self.installed.emit()
+ return
class Norun(QObject):
def __init__(self):