summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-09-08 12:19:04 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-09-08 12:19:04 +0100
commit9dbe22f88fae49eac34bdb123f2e1acfc24a6a99 (patch)
treebcaab880e1598d51861d1ba47bdbfa41287dab6b /src
parent14b3243518ef774655081ec03d2b01542e3f9c37 (diff)
start replacing subprocess.call with subprocess.Popen
Diffstat (limited to 'src')
-rw-r--r--src/backend/libsisyphus.py42
1 files changed, 30 insertions, 12 deletions
diff --git a/src/backend/libsisyphus.py b/src/backend/libsisyphus.py
index 8af5bf7..550f26c 100644
--- a/src/backend/libsisyphus.py
+++ b/src/backend/libsisyphus.py
@@ -185,33 +185,51 @@ def syncPortageTree():
currentBranch = subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD'])
if currentBranch.decode().strip() is 'master':
- subprocess.call(['git', 'fetch', '--depth=1', 'origin', 'master', '--quiet'])
- subprocess.call(['git', 'reset', '--hard', 'origin/master', '--quiet'])
+ gitExecStage1 = subprocess.Popen(['git', 'fetch', '--depth=1', 'origin', 'master', '--quiet'], stdoud=subprocess.PIPE)
+ gitExecStage2 = subprocess.Popen(['git', 'reset', '--hard', 'origin/master', '--quiet'], stdout=subprocess.PIPE)
+
+ gitExecStage1.wait()
+ gitExecStage2.wait()
elif currentBranch.decode().strip() is 'next':
- subprocess.call(['git', 'fetch', '--depth=1', 'origin', 'next', '--quiet'])
- subprocess.call(['git', 'reset', '--hard', 'origin/next', '--quiet'])
+ gitExecStage1 = subprocess.Popen(['git', 'fetch', '--depth=1', 'origin', 'next', '--quiet'], stdoud=subprocess.PIPE)
+ gitExecStage2 = subprocess.Popen(['git', 'reset', '--hard', 'origin/next', '--quiet'], stdout=subprocess.PIPE)
+
+ gitExecStage1.wait()
+ gitExecStage2.wait()
def syncOverlayTree():
os.chdir(redcoreEbuildDir)
currentBranch = subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD'])
if currentBranch.decode().strip() is 'master':
- subprocess.call(['git', 'fetch', '--depth=1', 'origin', 'master', '--quiet'])
- subprocess.call(['git', 'reset', '--hard', 'origin/master', '--quiet'])
+ gitExecStage1 = subprocess.Popen(['git', 'fetch', '--depth=1', 'origin', 'master', '--quiet'], stdoud=subprocess.PIPE)
+ gitExecStage2 = subprocess.Popen(['git', 'reset', '--hard', 'origin/master', '--quiet'], stdout=subprocess.PIPE)
+
+ gitExecStage1.wait()
+ gitExecStage2.wait()
elif currentBranch.decode().strip() is 'next':
- subprocess.call(['git', 'fetch', '--depth=1', 'origin', 'next', '--quiet'])
- subprocess.call(['git', 'reset', '--hard', 'origin/next', '--quiet'])
+ gitExecStage1 = subprocess.Popen(['git', 'fetch', '--depth=1', 'origin', 'next', '--quiet'], stdoud=subprocess.PIPE)
+ gitExecStage2 = subprocess.Popen(['git', 'reset', '--hard', 'origin/next', '--quiet'], stdout=subprocess.PIPE)
+
+ gitExecStage1.wait()
+ gitExecStage2.wait()
def syncPortageCfg():
os.chdir(portageConfigDir)
currentBranch = subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD'])
if currentBranch.decode().strip() is 'master':
- subprocess.call(['git', 'fetch', '--depth=1', 'origin', 'master', '--quiet'])
- subprocess.call(['git', 'reset', '--hard', 'origin/master', '--quiet'])
+ gitExecStage1 = subprocess.Popen(['git', 'fetch', '--depth=1', 'origin', 'master', '--quiet'], stdoud=subprocess.PIPE)
+ gitExecStage2 = subprocess.Popen(['git', 'reset', '--hard', 'origin/master', '--quiet'], stdout=subprocess.PIPE)
+
+ gitExecStage1.wait()
+ gitExecStage2.wait()
elif currentBranch.decode().strip() is 'next':
- subprocess.call(['git', 'fetch', '--depth=1', 'origin', 'next', '--quiet'])
- subprocess.call(['git', 'reset', '--hard', 'origin/next', '--quiet'])
+ gitExecStage1 = subprocess.Popen(['git', 'fetch', '--depth=1', 'origin', 'next', '--quiet'], stdoud=subprocess.PIPE)
+ gitExecStage2 = subprocess.Popen(['git', 'reset', '--hard', 'origin/next', '--quiet'], stdout=subprocess.PIPE)
+
+ gitExecStage1.wait()
+ gitExecStage2.wait()
def syncPortageMtd():
if os.path.isdir(portageMetadataDir):