From 9e7068ab3d7168890d3b21d4489a24302f018221 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Sun, 1 Jul 2012 07:58:22 +0100 Subject: [PATCH] Reselect when using "0install run -g APP" or with extra requirements --- zeroinstall/cmd/run.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/zeroinstall/cmd/run.py b/zeroinstall/cmd/run.py index 0828b07..0b3ccd1 100644 --- a/zeroinstall/cmd/run.py +++ b/zeroinstall/cmd/run.py @@ -35,18 +35,24 @@ def handle(config, options, args): app = config.app_mgr.lookup_app(args[0], missing_ok = True) if app is not None: sels = app.get_selections() - dl = app.download_selections(sels) - if dl: - tasks.wait_for_blocker(dl) - tasks.check(dl) + r = app.get_requirements() + do_select = r.parse_update_options(options) + iface_uri = sels.interface else: iface_uri = model.canonical_iface_uri(args[0]) + do_select = True + if do_select or options.gui: sels = select.get_selections(config, options, iface_uri, select_only = False, download_only = False, test_callback = test_callback) if not sels: sys.exit(1) # Aborted by user + else: + dl = app.download_selections(sels) + if dl: + tasks.wait_for_blocker(dl) + tasks.check(dl) from zeroinstall.injector import run run.execute_selections(sels, prog_args, dry_run = options.dry_run, main = options.main, wrapper = options.wrapper, stores = config.stores) -- 2.11.4.GIT