summaryrefslogtreecommitdiff
path: root/src/backend/update.py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-08-09 23:04:03 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-08-09 23:04:03 +0100
commitd5f7286a28caf0a7f628c09b515e7ed59a1a85fb (patch)
treec3102c803e5007b7b38aaad5319e2724a1250c2c /src/backend/update.py
parenta5d35ec38e020ad47c47247888843052587118e1 (diff)
backend : split check.branch() function
Diffstat (limited to 'src/backend/update.py')
-rw-r--r--src/backend/update.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/backend/update.py b/src/backend/update.py
index 0253118..0fe1fde 100644
--- a/src/backend/update.py
+++ b/src/backend/update.py
@@ -18,29 +18,31 @@ def syncAll():
@animation.wait('fetching updates')
def start():
+ activeBranch = sisyphus.check.branch()
isBinhost = sisyphus.binhost.start()
- needsMatch,localBranch = sisyphus.check.branch()
+ isSane = sisyphus.check.sanity()
- if needsMatch == 0:
+ if isSane == 1:
syncAll()
else:
if "packages-next" in isBinhost:
- print("\nCurrent branch: '" + localBranch.decode().strip() + "' (stable)" + "\nCurrent binhost: '" + isBinhost + "' (testing)")
+ print("\nCurrent branch: '" + activeBranch + "' (stable)" + "\nCurrent binhost: '" + isBinhost + "' (testing)")
else:
- print("\nCurrent branch: '" + localBranch.decode().strip() + "' (testing)" + "\nCurrent binhost: '" + isBinhost + "' (stable)")
+ print("\nCurrent branch: '" + activeBranch + "' (testing)" + "\nCurrent binhost: '" + isBinhost + "' (stable)")
sys.exit("\nInvalid branch - binhost pairing; Use 'sisyphus branch --help' for help; Quitting.")
def startqt():
+ activeBranch = sisyphus.check.branch()
isBinhost = sisyphus.binhost.start()
- needsMatch,localBranch = sisyphus.check.branch()
+ isSane = sisyphus.check.sanity()
- if needsMatch == 0:
+ if isSane == 1:
syncAll()
else:
if "packages-next" in isBinhost:
- print("\nCurrent branch: '" + localBranch.decode().strip() + "' (stable)" + "\nCurrent binhost: '" + isBinhost + "' (testing)")
+ print("\nCurrent branch: '" + activeBranch + "' (stable)" + "\nCurrent binhost: '" + isBinhost + "' (testing)")
else:
- print("\nCurrent branch: '" + localBranch.decode().strip() + "' (testing)" + "\nCurrent binhost: '" + isBinhost + "' (stable)")
+ print("\nCurrent branch: '" + activeBranch + "' (testing)" + "\nCurrent binhost: '" + isBinhost + "' (stable)")
print("\nInvalid branch - binhost pairing; Use 'sisyphus branch --help' for help; Quitting in 10 seconds.\n")
t = int(10)
while t: