diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-03-06 21:43:18 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-03-06 21:43:18 +0000 |
commit | a1067ff82a989fb6d7d8026bd16992ab9fb13898 (patch) | |
tree | cc3de7b56e2ac1c3ebce98b2b09389b6fd3cda78 /src/backend/check.py | |
parent | 170f9d7b708902c2f8b58d911383aef2ef35941a (diff) |
backend:
* drop some checks we had in place due to expensive metadata regen
* less time checking -> more time working -> faster sisyphus
Diffstat (limited to 'src/backend/check.py')
-rw-r--r-- | src/backend/check.py | 36 |
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 |