summaryrefslogtreecommitdiff
path: root/src/backend/branchnext.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/branchnext.py')
-rw-r--r--src/backend/branchnext.py29
1 files changed, 13 insertions, 16 deletions
diff --git a/src/backend/branchnext.py b/src/backend/branchnext.py
index bb29b04..5c9e390 100644
--- a/src/backend/branchnext.py
+++ b/src/backend/branchnext.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 next')
def setGitlabNextStage1():
- 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', 'next', '--quiet'])
@@ -19,8 +16,8 @@ def setGitlabNextStage1():
@animation.wait('injecting redcore linux ebuild tree - branch next')
def setGitlabNextStage2():
- 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', 'next', '--quiet'])
@@ -28,8 +25,8 @@ def setGitlabNextStage2():
@animation.wait('injecting redcore linux portage configuration - branch next')
def setGitlabNextStage3():
- 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', 'next', '--quiet'])
@@ -42,8 +39,8 @@ def startGitlab():
@animation.wait('injecting gentoo linux portage tree - branch next')
def setPagureNextStage1():
- 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', 'next', '--quiet'])
@@ -51,8 +48,8 @@ def setPagureNextStage1():
@animation.wait('injecting redcore linux ebuild tree - branch next')
def setPagureNextStage2():
- 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', 'next', '--quiet'])
@@ -60,8 +57,8 @@ def setPagureNextStage2():
@animation.wait('injecting redcore linux portage configuration - branch next')
def setPagureNextStage3():
- 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', 'next', '--quiet'])