summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2010-12-18 21:07:21 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2010-12-18 21:07:21 +0100
commit0effcb56236a9b42223f7489d2d363539e694145 (patch)
tree1d7d7bf76a495971231225c158563c3054c32d9b /src
parent0b800e6c6e1890fa45de6e506aa7893de58ae73b (diff)
make package extra info also contain package version
Diffstat (limited to 'src')
-rw-r--r--src/core/libs/lib-pacman.sh4
-rw-r--r--src/core/libs/lib-ui-interactive.sh4
2 files changed, 4 insertions, 4 deletions
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:
-# <pkgname> <group> <desc>
+# <pkgname> <version> <group> <desc>
# 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