diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-03-06 21:20:06 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-03-06 21:20:06 +0000 |
commit | 170f9d7b708902c2f8b58d911383aef2ef35941a (patch) | |
tree | 38e62857b8383807a2ee0921acdd84874295ca02 | |
parent | df346a9e0facec5bc7e69a106d4e0e3776c966a4 (diff) |
backend :
* we now ship updated metadata in our ebuild tree
* we fetch it via normal update/sync operation
* local regen/update is no longer required
* this will improve update/sync operations considerably
-rw-r--r-- | src/backend/branchsetup.py | 4 | ||||
-rw-r--r-- | src/backend/cache.py | 2 | ||||
-rw-r--r-- | src/backend/metadata.py | 14 | ||||
-rw-r--r-- | src/backend/update.py | 4 |
4 files changed, 6 insertions, 18 deletions
diff --git a/src/backend/branchsetup.py b/src/backend/branchsetup.py index f3546b4..793376b 100644 --- a/src/backend/branchsetup.py +++ b/src/backend/branchsetup.py @@ -4,6 +4,7 @@ import animation import git import os import sys +import sisyphus.cache import sisyphus.check import sisyphus.branchreset import sisyphus.filesystem @@ -84,12 +85,13 @@ def warnAboutBinaryRepository(branch,remote): def start(branch,remote): if sisyphus.check.root(): sisyphus.branchreset.start() + sisyphus.cache.purge() + sisyphus.metadata.purge() injectGentooPortageTree(branch,remote) injectRedcoreEbuildOverlay(branch,remote) injectRedcorePortageConfig(branch,remote) sisyphus.setjobs.start() sisyphus.setprofile.start() - sisyphus.metadata.regenAnimated() warnAboutBinaryRepository(branch,remote) else: sys.exit("\nYou need root permissions to do this, exiting!\n") diff --git a/src/backend/cache.py b/src/backend/cache.py index b040323..ed291f0 100644 --- a/src/backend/cache.py +++ b/src/backend/cache.py @@ -4,7 +4,7 @@ import os import shutil import sisyphus.filesystem -def clean(): +def purge(): if os.path.isdir(sisyphus.filesystem.portageCacheDir): for files in os.listdir(sisyphus.filesystem.portageCacheDir): if os.path.isfile(os.path.join(sisyphus.filesystem.portageCacheDir, files)): diff --git a/src/backend/metadata.py b/src/backend/metadata.py index 99384a0..f906c95 100644 --- a/src/backend/metadata.py +++ b/src/backend/metadata.py @@ -6,22 +6,10 @@ import shutil import subprocess import sisyphus.filesystem -def regenMetadata(): +def purge(): if os.path.isdir(sisyphus.filesystem.portageMetadataDir): for files in os.listdir(sisyphus.filesystem.portageMetadataDir): if os.path.isfile(os.path.join(sisyphus.filesystem.portageMetadataDir, files)): os.remove(os.path.join(sisyphus.filesystem.portageMetadataDir, files)) else: shutil.rmtree(os.path.join(sisyphus.filesystem.portageMetadataDir, files)) - - portageExecStage1 = subprocess.Popen(['emerge', '--quiet', '--regen'], stdout=subprocess.PIPE) - portageExecStage1.wait() - portageExecStage2 = subprocess.Popen(['emerge', '--quiet', '--metadata'], stdout=subprocess.PIPE) - portageExecStage2.wait() - -def regenSilent(): - regenMetadata() - -@animation.wait("regenerating package metadata") -def regenAnimated(): - regenMetadata() diff --git a/src/backend/update.py b/src/backend/update.py index df6dc5d..2b92dbd 100644 --- a/src/backend/update.py +++ b/src/backend/update.py @@ -7,7 +7,6 @@ import sisyphus.cache import sisyphus.binhost import sisyphus.check import sisyphus.database -import sisyphus.metadata import sisyphus.sync def syncAll(): @@ -15,13 +14,12 @@ def syncAll(): sisyphus.sync.overlay() sisyphus.sync.portageCfg() sisyphus.database.syncRemote() - sisyphus.metadata.regenSilent() def syncCfg(): sisyphus.sync.portageCfg() def doSync(): - sisyphus.cache.clean() + sisyphus.cache.purge() needsPortage = sisyphus.check.portage() needsOverlay = sisyphus.check.overlay() |