index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Xavier Chantry <shiningxc@gmail.com> | 2008-07-31 16:35:21 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-08-23 08:38:25 -0500 |
commit | 96e023c7bd0b1069878667278a45a34476c42472 (patch) | |
tree | d848f573ad7ccf51e986950cfb6ebb84ef8bfb12 | |
parent | e27a8c9ae323c275b0c3503d6a6ea18b639f4dc6 (diff) |
-rw-r--r-- | src/pacman/callback.c | 2 | ||||
-rw-r--r-- | src/pacman/util.c | 9 | ||||
-rw-r--r-- | src/pacman/util.h | 1 |
diff --git a/src/pacman/callback.c b/src/pacman/callback.c index b8e2d77e..8d4538c4 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -181,6 +181,7 @@ void cb_trans_evt(pmtransevt_t event, void *data1, void *data2) alpm_logaction("installed %s (%s)\n", alpm_pkg_get_name(data1), alpm_pkg_get_version(data1)); + display_optdepends(data1); break; case PM_TRANS_EVT_REMOVE_START: if(config->noprogressbar) { @@ -202,6 +203,7 @@ void cb_trans_evt(pmtransevt_t event, void *data1, void *data2) (char *)alpm_pkg_get_name(data1), (char *)alpm_pkg_get_version(data2), (char *)alpm_pkg_get_version(data1)); + display_optdepends(data1); break; case PM_TRANS_EVT_INTEGRITY_START: printf(_("checking package integrity...\n")); diff --git a/src/pacman/util.c b/src/pacman/util.c index 1a74c9ea..8c4aeab8 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -609,6 +609,15 @@ void display_synctargets(const alpm_list_t *syncpkgs) alpm_list_free(rpkglist); } +void display_optdepends(pmpkg_t *pkg) +{ + alpm_list_t *optdeps = alpm_pkg_get_optdepends(pkg); + if(optdeps) { + printf(_("Optional dependencies for %s\n"), alpm_pkg_get_name(pkg)); + list_display_linebreak(" ", optdeps); + } +} + /* presents a prompt and gets a Y/N answer */ int yesno(short preset, char *fmt, ...) { diff --git a/src/pacman/util.h b/src/pacman/util.h index 209b2424..f94f0aed 100644 --- a/src/pacman/util.h +++ b/src/pacman/util.h @@ -54,6 +54,7 @@ void list_display(const char *title, const alpm_list_t *list); void list_display_linebreak(const char *title, const alpm_list_t *list); void display_targets(const alpm_list_t *pkgs, int install); void display_synctargets(const alpm_list_t *syncpkgs); +void display_optdepends(pmpkg_t *pkg); int yesno(short preset, char *fmt, ...); int pm_printf(pmloglevel_t level, const char *format, ...) __attribute__((format(printf,2,3))); int pm_fprintf(FILE *stream, pmloglevel_t level, const char *format, ...) __attribute__((format(printf,3,4))); |