From 41042618cfcecab36abe16108a3685b0dfc2f694 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 4 Jul 2019 21:04:15 +0100 Subject: libsisyphus : fix a race condition && sisyphus-gui : use breeze style if available --- src/backend/libsisyphus.py | 13 +++++++++++-- src/frontend/gui/sisyphus-gui.py | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/backend/libsisyphus.py b/src/backend/libsisyphus.py index a23b557..6e91eb8 100644 --- a/src/backend/libsisyphus.py +++ b/src/backend/libsisyphus.py @@ -37,8 +37,9 @@ def getMirrorList(): if line.startswith('#'): mirror['isActive'] = False mirrorList.append(mirror) - mirrorFile.close() - return mirrorList + mirrorFile.close() + + return mirrorList def getBinhostURL(): binhostURL = [] @@ -47,6 +48,8 @@ def getBinhostURL(): for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"): if "PORTAGE_BINHOST" in portageOutput.rstrip(): binhostURL = str(portageOutput.rstrip().split("=")[1].strip('\"')) + + portageExec.wait() return binhostURL def getCsvUrl(): @@ -62,6 +65,8 @@ def getCsvUrl(): else: remotePkgCsv = str(portageOutput.rstrip().split("=")[1].strip('\"').replace('packages', 'csv') + 'remotePackagesPre.csv') remoteDescCsv = str(portageOutput.rstrip().split("=")[1].strip('\"').replace('packages', 'csv') + 'remoteDescriptionsPre.csv') + + portageExec.wait() return remotePkgCsv,remoteDescCsv @animation.wait('resolving dependencies') @@ -92,6 +97,8 @@ def getPackageDeps(pkgList): if "ebuild" in portageOutput.rstrip(): isSource = str(portageOutput.rstrip().split("]")[1].split("[")[0].strip("\ ")) areSources.append(isSource) + + portageExec.wait() return areBinaries,areSources,needsConfig @animation.wait('resolving dependencies') @@ -122,6 +129,8 @@ def getWorldDeps(): if "ebuild" in portageOutput.rstrip(): isSource = str(portageOutput.rstrip().split("]")[1].split("[")[0].strip("\ ")) areSources.append(isSource) + + portageExec.wait() return areBinaries,areSources,needsConfig def fetchRemoteDatabase(): diff --git a/src/frontend/gui/sisyphus-gui.py b/src/frontend/gui/sisyphus-gui.py index 962abf8..f643c9b 100644 --- a/src/frontend/gui/sisyphus-gui.py +++ b/src/frontend/gui/sisyphus-gui.py @@ -516,5 +516,6 @@ class MainWorker(QtCore.QObject): # launch application if __name__ == '__main__': app = QtWidgets.QApplication(sys.argv) + app.setStyle('Breeze') window = Sisyphus() sys.exit(app.exec_()) -- cgit v1.2.3