From 0effcb56236a9b42223f7489d2d363539e694145 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Sat, 18 Dec 2010 21:07:21 +0100 Subject: make package extra info also contain package version --- src/core/libs/lib-pacman.sh | 4 ++-- src/core/libs/lib-ui-interactive.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/core/libs/lib-pacman.sh b/src/core/libs/lib-pacman.sh index 2ce8706..2b1220e 100644 --- a/src/core/libs/lib-pacman.sh +++ b/src/core/libs/lib-pacman.sh @@ -150,10 +150,10 @@ which_group () # get group and packagedesc for packages # arguments: packages # output format: multiple lines, each line like: -# +# # order is the same as the input # note that space is used as separator, but desc is the only thing that will contain spaces. pkginfo () { - PACKAGE_INFO=`LANG=C $PACMAN_TARGET -Si "$@" | awk '/^Name/{ printf("%s ",$3) } /^Group/{ printf("%s", $3) } /^Description/{ for(i=3;i<=NF;++i) printf(" %s",$i); printf ("\n")}'` + PACKAGE_INFO=`LANG=C $PACMAN_TARGET -Si "$@" | awk '/^Name/{ printf("%s ",$3) } /^Version/{ printf("%s ",$3) } /^Group/{ printf("%s", $3) } /^Description/{ for(i=3;i<=NF;++i) printf(" %s",$i); printf ("\n")}'` } diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index 2ee3a2c..80758b6 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -751,12 +751,12 @@ If any previous configuration you've done until now (like fancy filesystems) req # build the list of options, sorted primarily by group, then by packagename (this is already). marking where appropriate local pkglist=() needed_pkgs=("${needed_pkgs_fs[@]}") - while read pkgname pkggroup pkgdesc; do + while read pkgname pkgver pkggroup pkgdesc; do mark=OFF if check_is_in "$pkggroup" "${grouplist[@]}" || check_is_in $pkgname "${needed_pkgs[@]}"; then mark=ON fi - pkglist+=("$pkgname" "$pkggroup" $mark "$pkgdesc") + pkglist+=("$pkgname" "$pkggroup" $mark "$pkgname $pkgver: $pkgdesc") done < <(echo "$PACKAGE_INFO" | sort -f -k 2) [ ${#pkglist[@]} -eq 0 ] && show_warning "No packages found" "Sorry. I could not find any packages. maybe your network is not setup correctly, you lost connection, no mirror setup, bad group, ..." && return 1 -- cgit v1.2.3-54-g00ecf