summaryrefslogtreecommitdiff
path: root/src/backend/update.py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-07-21 04:00:44 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-07-21 04:00:44 +0100
commit74d84cc070134494f144318b534563098a5994c4 (patch)
tree5e87b85f8fc13349a4cddf4c0abb6f0a88a42fd4 /src/backend/update.py
parent78eca7889aebbc3e7f141f23a41eb9b3b79f3a69 (diff)
backend : rework the update logic a little
gui-frontend : hide the progress box initially, only show it when needed, make it significantly larger, disable UI elements instead of hiding them
Diffstat (limited to 'src/backend/update.py')
-rw-r--r--src/backend/update.py35
1 files changed, 23 insertions, 12 deletions
diff --git a/src/backend/update.py b/src/backend/update.py
index face3f2..a57cb07 100644
--- a/src/backend/update.py
+++ b/src/backend/update.py
@@ -49,26 +49,37 @@ def start(gfx_ui=False):
if is_sane == 1:
sync_evrth()
else:
- if "packages-next" in bhst_addr:
- print(sisyphus.getcolor.green + "\n\nActive branch:" + " " +
- sisyphus.getcolor.reset + "'" + actv_brch + "'" + " " + "(stable)")
- print(sisyphus.getcolor.green + "\nActive binhost:" + " " +
- sisyphus.getcolor.reset + "'" + bhst_addr + "'" + " " + "(testing)")
- else:
- print(sisyphus.getcolor.green + "\n\nActive branch:" + " " +
- sisyphus.getcolor.reset + "'" + actv_brch + "'" + " " + "(testing)")
- print(sisyphus.getcolor.green + "\nActive binhost:" + " " +
- sisyphus.getcolor.reset + "'" + bhst_addr + "'" + " " + "(stable)")
-
if gfx_ui:
+ if "packages-next" in bhst_addr:
+ print("\n\nActive branch:" + " " + "'" +
+ actv_brch + "'" + " " + "(stable)")
+ print("\n\nActive binhost:" + " " + "'" +
+ bhst_addr + "'" + " " + "(testing)")
+ else:
+ print("\n\nActive branch:" + " " + "'" +
+ actv_brch + "'" + " " + "(testing)")
+ print("\n\nActive binhost:" + " " + "'" +
+ bhst_addr + "'" + " " + "(stable)")
+
print("\n\nInvalid configuration!")
- print("Use 'sisyphus branch --help' for help\n")
+ print("\nUse 'sisyphus branch --help' for help\n")
for i in range(9, 0, -1):
print(f"Killing application in : {i} seconds!")
time.sleep(1)
sys.exit(app.exec_()) # kill GUI window
else:
+ if "packages-next" in bhst_addr:
+ print(sisyphus.getcolor.green + "\n\nActive branch:" + " " +
+ sisyphus.getcolor.reset + "'" + actv_brch + "'" + " " + "(stable)")
+ print(sisyphus.getcolor.green + "\nActive binhost:" + " " +
+ sisyphus.getcolor.reset + "'" + bhst_addr + "'" + " " + "(testing)")
+ else:
+ print(sisyphus.getcolor.green + "\n\nActive branch:" + " " +
+ sisyphus.getcolor.reset + "'" + actv_brch + "'" + " " + "(testing)")
+ print(sisyphus.getcolor.green + "\nActive binhost:" + " " +
+ sisyphus.getcolor.reset + "'" + bhst_addr + "'" + " " + "(stable)")
+
print(sisyphus.getcolor.bright_red +
"\n\nInvalid configuration!" + sisyphus.getcolor.reset)
print(sisyphus.getcolor.bright_yellow + "\nUse" + sisyphus.getcolor.reset + " " + "'" +