summaryrefslogtreecommitdiff
path: root/src/backend/update.py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-06-06 16:22:04 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-06-06 16:22:04 +0100
commitac0efd1bd6c703147bd8d3caedf489fab87d6131 (patch)
treee6af981b6e90be35447dbb88dd276a4d8ff2d47e /src/backend/update.py
parent49e6ab19aa461151132dfb4f1cf962d4ef403c66 (diff)
big rewrite : split the backend in smaller pieces, rework the cli frontend to work with the new backend ... gui frontend wip
Diffstat (limited to 'src/backend/update.py')
-rw-r--r--src/backend/update.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/backend/update.py b/src/backend/update.py
new file mode 100644
index 0000000..dd184d2
--- /dev/null
+++ b/src/backend/update.py
@@ -0,0 +1,39 @@
+#!/usr/bin/python3
+
+import animation
+import sisyphus.check
+import sisyphus.clean
+import sisyphus.database
+import sisyphus.metadata
+import sisyphus.sync
+
+@animation.wait('fetching updates')
+def start():
+ sisyphus.check.root()
+ sisyphus.clean.cache()
+
+ 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()