summaryrefslogtreecommitdiff
path: root/src/backend/update.py
diff options
context:
space:
mode:
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()