summaryrefslogtreecommitdiff
path: root/src/backend/branchmaster.py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-06-06 20:37:56 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-06-06 20:37:56 +0100
commited88746cd33c0f861e9c45bf05bf9e44d86089ba (patch)
treee6656f3d54bd738383d048c744d330dca2c15e4c /src/backend/branchmaster.py
parent2d86cd9ddc5d9442e4a8e8fb50d72480a8293a4a (diff)
filesystem module : gather all the folder and file paths used by sisyphus under one module, and expose them to other modules from there
Diffstat (limited to 'src/backend/branchmaster.py')
-rw-r--r--src/backend/branchmaster.py29
1 files changed, 13 insertions, 16 deletions
diff --git a/src/backend/branchmaster.py b/src/backend/branchmaster.py
index 6229511..6a114c5 100644
--- a/src/backend/branchmaster.py
+++ b/src/backend/branchmaster.py
@@ -3,15 +3,12 @@
import animation
import os
import subprocess
-
-gentooEbuildDir = '/usr/ports/gentoo'
-redcoreEbuildDir = '/usr/ports/redcore'
-portageConfigDir = '/opt/redcore-build'
+import sisyphus.filesystem
@animation.wait('injecting gentoo linux portage tree - branch master')
def setGitlabMasterStage1():
- if not os.path.isdir(os.path.join(gentooEbuildDir, '.git')):
- os.chdir(gentooEbuildDir)
+ if not os.path.isdir(os.path.join(sisyphus.filesystem.gentooEbuildDir, '.git')):
+ os.chdir(sisyphus.filesystem.gentooEbuildDir)
subprocess.call(['git', 'init', '-q'])
subprocess.call(['git', 'remote', 'add', 'origin', 'https://gitlab.com/redcore/portage.git'])
subprocess.call(['git', 'fetch', '--depth=1', 'origin', 'master', '--quiet'])
@@ -19,8 +16,8 @@ def setGitlabMasterStage1():
@animation.wait('injecting redcore linux ebuild tree - branch master')
def setGitlabMasterStage2():
- if not os.path.isdir(os.path.join(redcoreEbuildDir, '.git')):
- os.chdir(redcoreEbuildDir)
+ if not os.path.isdir(os.path.join(sisyphus.filesystem.redcoreEbuildDir, '.git')):
+ os.chdir(sisyphus.filesystem.redcoreEbuildDir)
subprocess.call(['git', 'init', '-q'])
subprocess.call(['git', 'remote', 'add', 'origin', 'https://gitlab.com/redcore/redcore-desktop.git'])
subprocess.call(['git', 'fetch', '--depth=1', 'origin', 'master', '--quiet'])
@@ -28,8 +25,8 @@ def setGitlabMasterStage2():
@animation.wait('injecting redcore linux portage configuration - branch master')
def setGitlabMasterStage3():
- if not os.path.isdir(os.path.join(portageConfigDir, '.git')):
- os.chdir(portageConfigDir)
+ if not os.path.isdir(os.path.join(sisyphus.filesystem.portageConfigDir, '.git')):
+ os.chdir(sisyphus.filesystem.portageConfigDir)
subprocess.call(['git', 'init', '-q'])
subprocess.call(['git', 'remote', 'add', 'origin', 'https://gitlab.com/redcore/redcore-build.git'])
subprocess.call(['git', 'fetch', '--depth=1', 'origin', 'master', '--quiet'])
@@ -42,8 +39,8 @@ def gitlabStart():
@animation.wait('injecting gentoo linux portage tree - branch master')
def setPagureMasterStage1():
- if not os.path.isdir(os.path.join(gentooEbuildDir, '.git')):
- os.chdir(gentooEbuildDir)
+ if not os.path.isdir(os.path.join(sisyphus.filesystem.gentooEbuildDir, '.git')):
+ os.chdir(sisyphus.filesystem.gentooEbuildDir)
subprocess.call(['git', 'init', '-q'])
subprocess.call(['git', 'remote', 'add', 'origin', 'https://pagure.io/redcore/portage.git'])
subprocess.call(['git', 'fetch', '--depth=1', 'origin', 'master', '--quiet'])
@@ -51,8 +48,8 @@ def setPagureMasterStage1():
@animation.wait('injecting redcore linux ebuild tree - branch master')
def setPagureMasterStage2():
- if not os.path.isdir(os.path.join(redcoreEbuildDir, '.git')):
- os.chdir(redcoreEbuildDir)
+ if not os.path.isdir(os.path.join(sisyphus.filesystem.redcoreEbuildDir, '.git')):
+ os.chdir(sisyphus.filesystem.redcoreEbuildDir)
subprocess.call(['git', 'init', '-q'])
subprocess.call(['git', 'remote', 'add', 'origin', 'https://pagure.io/redcore/redcore-desktop.git'])
subprocess.call(['git', 'fetch', '--depth=1', 'origin', 'master', '--quiet'])
@@ -60,8 +57,8 @@ def setPagureMasterStage2():
@animation.wait('injecting redcore linux portage configuration - branch master')
def setPagureMasterStage3():
- if not os.path.isdir(os.path.join(portageConfigDir, '.git')):
- os.chdir(portageConfigDir)
+ if not os.path.isdir(os.path.join(sisyphus.filesystem.portageConfigDir, '.git')):
+ os.chdir(sisyphus.filesystem.portageConfigDir)
subprocess.call(['git', 'init', '-q'])
subprocess.call(['git', 'remote', 'add', 'origin', 'https://pagure.io/redcore/redcore-build.git'])
subprocess.call(['git', 'fetch', '--depth=1', 'origin', 'master', '--quiet'])