summaryrefslogtreecommitdiff
path: root/src/backend/check.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/check.py')
-rw-r--r--src/backend/check.py36
1 files changed, 1 insertions, 35 deletions
diff --git a/src/backend/check.py b/src/backend/check.py
index f6ef68d..a159a27 100644
--- a/src/backend/check.py
+++ b/src/backend/check.py
@@ -8,7 +8,7 @@ import sisyphus.filesystem
def root():
return True if os.getuid() == 0 else False
-def match():
+def branch():
if os.path.isdir(os.path.join(sisyphus.filesystem.portageRepoDir, '.git')):
os.chdir(sisyphus.filesystem.portageRepoDir)
needsMatch = int()
@@ -28,37 +28,3 @@ def match():
needsMatch = int(1)
return needsMatch,localBranch
-
-def portage():
- if os.path.isdir(os.path.join(sisyphus.filesystem.portageRepoDir, '.git')):
- os.chdir(sisyphus.filesystem.portageRepoDir)
- needsPortage = int()
-
- localBranch = subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD'])
- localHash = subprocess.check_output(['git', 'rev-parse', '@'])
- remoteHash = subprocess.check_output(['git', 'rev-parse', '@{u}'])
-
- gitExec = subprocess.Popen(['git', 'fetch', '--depth=1', 'origin'] + localBranch.decode().strip().split() + ['--quiet'], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
-
- if not localHash.decode().strip() == remoteHash.decode().strip():
- needsPortage = int(1)
-
- gitExec.wait()
- return needsPortage
-
-def overlay():
- if os.path.isdir(os.path.join(sisyphus.filesystem.redcoreRepoDir, '.git')):
- os.chdir(sisyphus.filesystem.redcoreRepoDir)
- needsOverlay = int()
-
- localBranch = subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD'])
- localHash = subprocess.check_output(['git', 'rev-parse', '@'])
- remoteHash = subprocess.check_output(['git', 'rev-parse', '@{u}'])
-
- gitExec = subprocess.Popen(['git', 'fetch', '--depth=1', 'origin'] + localBranch.decode().strip().split() + ['--quiet'], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
-
- if not localHash.decode().strip() == remoteHash.decode().strip():
- needsOverlay = int(1)
-
- gitExec.wait()
- return needsOverlay