diff options
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/install.py | 4 | ||||
-rw-r--r-- | src/backend/search.py | 2 | ||||
-rw-r--r-- | src/backend/update.py | 41 | ||||
-rw-r--r-- | src/backend/upgrade.py | 4 |
4 files changed, 21 insertions, 30 deletions
diff --git a/src/backend/install.py b/src/backend/install.py index 83f26f6..16779c5 100644 --- a/src/backend/install.py +++ b/src/backend/install.py @@ -18,7 +18,7 @@ import sisyphus.update def start(pkgname): if sisyphus.checkenv.root(): - sisyphus.update.start() + sisyphus.update.start(gfx_ui=False) sisyphus.solvedeps.start(pkgname) bin_list, src_list, need_cfg = pickle.load( open(os.path.join(sisyphus.getfs.p_mtd_dir, "sisyphus_pkgdeps.pickle"), "rb")) @@ -72,7 +72,7 @@ def start(pkgname): def estart(pkgname): if sisyphus.checkenv.root(): - sisyphus.update.start() + sisyphus.update.start(gfx_ui=False) sisyphus.solvedeps.start(pkgname) bin_list, src_list, need_cfg = pickle.load( open(os.path.join(sisyphus.getfs.p_mtd_dir, "sisyphus_pkgdeps.pickle"), "rb")) diff --git a/src/backend/search.py b/src/backend/search.py index ab6ffa2..588f9cd 100644 --- a/src/backend/search.py +++ b/src/backend/search.py @@ -146,7 +146,7 @@ def srch_rslt(filter, cat, pn, desc, single): def start(filter, cat, pn, desc, single): if sisyphus.checkenv.root(): - sisyphus.update.start() + sisyphus.update.start(gfx_ui=False) else: print(sisyphus.getcolor.bright_red + "\nYou don't have root permissions, cannot update the database!\n" + sisyphus.getcolor.reset + sisyphus.getcolor.bright_yellow + "\nSearch results may be inaccurate" + sisyphus.getcolor.reset) diff --git a/src/backend/update.py b/src/backend/update.py index dc16d4c..54e07e3 100644 --- a/src/backend/update.py +++ b/src/backend/update.py @@ -19,7 +19,7 @@ def sync_evrth(): @animation.wait('fetching updates') -def start(): +def start(gfx_ui=False): actv_brch = sisyphus.getenv.sys_brch() bhst_addr = sisyphus.getenv.bhst_addr() is_sane = sisyphus.checkenv.sanity() @@ -33,31 +33,22 @@ def start(): else: print(sisyphus.getcolor.green + "\n\nActive branch:" + " " + sisyphus.getcolor.reset + "'" + actv_brch + "'" + " " + "(testing)" + " " + sisyphus.getcolor.green + "\nActive binhost:" + " " + sisyphus.getcolor.reset + "'" + bhst_addr + "'" + " " + "(stable)") - sys.exit(sisyphus.getcolor.bright_red + "\n\nInvalid configuration!" + sisyphus.getcolor.reset + sisyphus.getcolor.bright_yellow + "\nUse" + - sisyphus.getcolor.reset + " " + "'" + "sisyphus branch --help" + "'" + " " + sisyphus.getcolor.bright_yellow + "for help" + sisyphus.getcolor.reset) + if gfx_ui: + print("\n\nInvalid configuration!") + print("Use 'sisyphus branch --help' for help\n") + t = 10 + while t > 0: + mins, secs = divmod(t, 60) + timer = '{:02d}:{:02d}'.format(mins, secs) + print(timer, end='\r') + time.sleep(1) + t -= 1 -def xstart(): - actv_brch = sisyphus.getenv.sys_brch() - bhst_addr = sisyphus.getenv.bhst_addr() - is_sane = sisyphus.checkenv.sanity() + print('Time is up!') + sys.exit() - if is_sane == 1: - sync_evrth() - else: - if "packages-next" in bhst_addr: - print("\n\nActive branch:" + " " + "'" + actv_brch + "'" + " " + "(stable)" + - "\nActive binhost:" + " " + "'" + bhst_addr + "'" + " " + "(testing)") else: - print("\n\nActive branch:" + " " + "'" + actv_brch + "'" + " " + "(testing)" + - "\nActive binhost:" + " " + "'" + bhst_addr + "'" + " " + "(stable)") - print("\n\nInvalid configuration!" + - "\nUse 'sisyphus branch --help' for help\n") - t = int(10) - while t: - mins, secs = divmod(t, 60) - timer = '{:02d}:{:02d}'.format(mins, secs) - print(timer, end="\r") - time.sleep(1) - t -= 1 - sys.exit() + print(sisyphus.getcolor.bright_red + "\n\nInvalid configuration!" + sisyphus.getcolor.reset + sisyphus.getcolor.bright_yellow + "\nUse" + + sisyphus.getcolor.reset + " " + "'" + "sisyphus branch --help" + "'" + " " + sisyphus.getcolor.bright_yellow + "for help" + sisyphus.getcolor.reset) + sys.exit() diff --git a/src/backend/upgrade.py b/src/backend/upgrade.py index 376872d..bffcf2d 100644 --- a/src/backend/upgrade.py +++ b/src/backend/upgrade.py @@ -18,7 +18,7 @@ import sisyphus.update def start(): if sisyphus.checkenv.root(): - sisyphus.update.start() + sisyphus.update.start(gfx_ui=False) sisyphus.solvedeps.start() bin_list, src_list, need_cfg = pickle.load( open(os.path.join(sisyphus.getfs.p_mtd_dir, "sisyphus_worlddeps.pickle"), "rb")) @@ -72,7 +72,7 @@ def start(): def estart(): if sisyphus.checkenv.root(): - sisyphus.update.start() + sisyphus.update.start(gfx_ui=False) sisyphus.solvedeps.start() bin_list, src_list, need_cfg = pickle.load( open(os.path.join(sisyphus.getfs.p_mtd_dir, "sisyphus_worlddeps.pickle"), "rb")) |