From 4097c98c1ee65d6b3a659d042c6c84e0632673bf Mon Sep 17 00:00:00 2001 From: Xavier Chantry Date: Sat, 16 Oct 2010 12:28:01 +0200 Subject: Add interactive provider selection If there are multiple providers in one db, pacman used to just stop at the first one (both during dependency resolution or for pacman -S 'provision' which uses the same code). This adds a new conversation callback so that the user can choose which provider to install. By default (user press enter or --noconfirm), the first provider is still chosen, so for example the behavior of sync402 and 403 is preserved. But at least the user now has the possibility to make the right choice in a manual run. If one of the provider is already installed, it is picked for reinstall/upgrade, so that provision 002/003 pactest now pass. $ pacman -S community/smtp-server :: There are 3 providers available for smtp-server: 1) courier-mta 2) esmtp 3) exim Which one do you want to install? Enter a number (default=1): Signed-off-by: Xavier Chantry --- src/pacman/util.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/pacman/util.h') diff --git a/src/pacman/util.h b/src/pacman/util.h index 78fe5b59..399f9bc8 100644 --- a/src/pacman/util.h +++ b/src/pacman/util.h @@ -59,6 +59,8 @@ int str_cmp(const void *s1, const void *s2); void display_new_optdepends(pmpkg_t *oldpkg, pmpkg_t *newpkg); void display_optdepends(pmpkg_t *pkg); void print_packages(const alpm_list_t *packages); +void select_display(const alpm_list_t *pkglist); +int select_question(int count); int yesno(char *fmt, ...); int noyes(char *fmt, ...); int pm_printf(pmloglevel_t level, const char *format, ...) __attribute__((format(printf,2,3))); -- cgit v1.2.3-24-g4f1b