diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-01-31 01:19:56 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-01-31 01:19:56 +0000 |
commit | e4f2e722b2740d16ddc2ffa9b184287a7850b203 (patch) | |
tree | d22fa625f7d4a31625d8153d2630c3a71f58b978 /src/backend/update.py | |
parent | 5eaef5fdcc4648c6156b0a5f6d8a2907c2a5a303 (diff) |
backend : reuse binhost module in csvfiles module, one less portage call
Diffstat (limited to 'src/backend/update.py')
-rw-r--r-- | src/backend/update.py | 54 |
1 files changed, 30 insertions, 24 deletions
diff --git a/src/backend/update.py b/src/backend/update.py index 902c398..b99da1c 100644 --- a/src/backend/update.py +++ b/src/backend/update.py @@ -1,6 +1,7 @@ #!/usr/bin/python3 import animation +import sys import sisyphus.cache import sisyphus.check import sisyphus.database @@ -11,28 +12,33 @@ import sisyphus.sync def start(): sisyphus.cache.clean() - needsPortage = sisyphus.check.portage() - needsOverlay = sisyphus.check.overlay() + mismatch = sisyphus.check.branch() - if needsPortage == 1: - if needsOverlay == 1: - sisyphus.sync.portage() - sisyphus.sync.overlay() - sisyphus.sync.portageCfg() - sisyphus.database.syncRemote() - sisyphus.metadata.regenSilent() - elif not needsOverlay == 1: - sisyphus.sync.portage() - sisyphus.sync.overlay() - sisyphus.sync.portageCfg() - sisyphus.database.syncRemote() - sisyphus.metadata.regenSilent() - elif not needsPortage == 1: - if needsOverlay == 1: - sisyphus.sync.portage() - sisyphus.sync.overlay() - sisyphus.sync.portageCfg() - sisyphus.database.syncRemote() - sisyphus.metadata.regenSilent() - elif not needsOverlay == 1: - sisyphus.sync.portageCfg() + if mismatch == 0: + needsPortage = sisyphus.check.portage() + needsOverlay = sisyphus.check.overlay() + + if needsPortage == 1: + if needsOverlay == 1: + sisyphus.sync.portage() + sisyphus.sync.overlay() + sisyphus.sync.portageCfg() + sisyphus.database.syncRemote() + sisyphus.metadata.regenSilent() + elif not needsOverlay == 1: + sisyphus.sync.portage() + sisyphus.sync.overlay() + sisyphus.sync.portageCfg() + sisyphus.database.syncRemote() + sisyphus.metadata.regenSilent() + elif not needsPortage == 1: + if needsOverlay == 1: + sisyphus.sync.portage() + sisyphus.sync.overlay() + sisyphus.sync.portageCfg() + sisyphus.database.syncRemote() + sisyphus.metadata.regenSilent() + elif not needsOverlay == 1: + sisyphus.sync.portageCfg() + else: + sys.exit("\n" + "") |