summaryrefslogtreecommitdiff
path: root/src/backend/getenv.py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-01-12 11:22:08 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-01-12 11:22:08 +0000
commit2016cc4db1569b9d210de235ef9feaefad6a7689 (patch)
treee52299aaf2f4d8d8b5e0a74eec784960a04cd68a /src/backend/getenv.py
parentfc46610f316eb45b017d8f054132f01d4c7c37d7 (diff)
minor tweaks
Diffstat (limited to 'src/backend/getenv.py')
-rw-r--r--src/backend/getenv.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/backend/getenv.py b/src/backend/getenv.py
index eebbfee..fcefa91 100644
--- a/src/backend/getenv.py
+++ b/src/backend/getenv.py
@@ -2,6 +2,7 @@
import io
import subprocess
+import sisyphus.getfs
def binhostURL():
@@ -12,8 +13,8 @@ def binhostURL():
for portageOutput in io.TextIOWrapper(portageExec.stdout, encoding="utf-8"):
if "PORTAGE_BINHOST" in portageOutput:
binhostURL = portageOutput.rstrip().split("=")[1].strip('\"')
-
portageExec.wait()
+
return binhostURL
@@ -34,3 +35,20 @@ def csvURL():
'packages', 'csv') + 'remoteDescriptionsPre.csv'
return packagesCsvURL, descriptionsCsvURL
+
+
+def systemBranch():
+ activeBranch = None
+
+ if os.path.isdir(os.path.join(sisyphus.getfs.gentooRepoDir, '.git')):
+ os.chdir(sisyphus.getfs.gentooRepoDir)
+ localBranch = subprocess.check_output(
+ ['git', 'rev-parse', '--abbrev-ref', 'HEAD'])
+
+ if localBranch.decode().strip() == 'master':
+ activeBranch = str('master')
+
+ if localBranch.decode().strip() == 'next':
+ activeBranch = str('next')
+
+ return activeBranch