diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-09-15 11:45:16 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-09-15 11:45:16 +0100 |
commit | e3f87d670b32727cc91d0b3654e6da72b469010a (patch) | |
tree | 6b7d64235222728495e6c4a8d4c24a56054efabf /src/backend | |
parent | b2db44be90a67db8005fb73024db59e22060bef6 (diff) |
regenerate portage metadata whenever we're changing the branches, rename some functionsv3.1909.2
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/libsisyphus.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/backend/libsisyphus.py b/src/backend/libsisyphus.py index d1afc06..ed6afb1 100644 --- a/src/backend/libsisyphus.py +++ b/src/backend/libsisyphus.py @@ -232,7 +232,7 @@ def syncOverlayTree(): gitExecStage2 = subprocess.Popen(['git', 'reset', '--hard'] + remoteBranch.decode().strip().replace('refs/remotes/','').split() + ['--quiet'], stdout=subprocess.PIPE) gitExecStage2.wait() -def syncPortageCfg(): +def syncPortageConfig(): os.chdir(portageConfigDir) localBranch = subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD']) remoteBranch = subprocess.check_output(['git', 'rev-parse', '--symbolic-full-name', '@{u}']) @@ -242,7 +242,7 @@ def syncPortageCfg(): gitExecStage2 = subprocess.Popen(['git', 'reset', '--hard'] + remoteBranch.decode().strip().replace('refs/remotes/','').split() + ['--quiet'], stdout=subprocess.PIPE) gitExecStage2.wait() -def syncPortageMtd(): +def regenPortageMetadata(): if os.path.isdir(portageMetadataDir): for files in os.listdir(portageMetadataDir): if os.path.isfile(os.path.join(portageMetadataDir, files)): @@ -263,7 +263,7 @@ def cleanCacheDir(): else: shutil.rmtree(os.path.join(portageCacheDir, files)) -def checkSync(): +def checkUpdate(): checkPortageTree() checkOverlayTree() @@ -279,22 +279,22 @@ def startUpdate(): if needsOverlayTreeSync == 1: syncPortageTree() syncOverlayTree() - syncPortageCfg() - syncPortageMtd() + syncPortageConfig() syncRemoteDatabase() + regenPortageMetadata() elif not needsOverlayTreeSync == 1: syncPortageTree() syncOverlayTree() - syncPortageCfg() - syncPortageMtd() + syncPortageConfig() syncRemoteDatabase() + regenPortageMetadata() elif not needsPortageTreeSync == 1: if needsOverlayTreeSync == 1: syncPortageTree() syncOverlayTree() - syncPortageCfg() - syncPortageMtd() + syncPortageConfig() syncRemoteDatabase() + regenPortageMetadata() elif not needsOverlayTreeSync == 1: pass @@ -770,6 +770,7 @@ def injectGitlabMaster(): setGitlabMaster() setHardenedProfile() setJobs() + regenPortageMetadata() def injectPagureMaster(): checkRoot() @@ -777,6 +778,7 @@ def injectPagureMaster(): setPagureMaster() setHardenedProfile() setJobs() + regenPortageMetadata() def injectGitlabNext(): checkRoot() @@ -784,6 +786,7 @@ def injectGitlabNext(): setGitlabNext() setHardenedProfile() setJobs() + regenPortageMetadata() def injectPagureNext(): checkRoot() @@ -791,6 +794,7 @@ def injectPagureNext(): setPagureNext() setHardenedProfile() setJobs() + regenPortageMetadata() def showHelp(): print("\n" + "Usage : sisyphus command [package(s)] || [file(s)]" + "\n") |