summaryrefslogtreecommitdiff
path: root/src/core/libs
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2010-12-18 21:07:41 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2010-12-18 21:07:41 +0100
commit80e96ea3589098e376b2714f69b47d30059335ef (patch)
tree8198f0086df40441668bd8b7f720bacfa0a30381 /src/core/libs
parent195b0383fbfd6c209c94277e9ddbc9ee333b0acc (diff)
parent0effcb56236a9b42223f7489d2d363539e694145 (diff)
Merge branch 'master' into btrfs
Diffstat (limited to 'src/core/libs')
-rw-r--r--src/core/libs/lib-pacman.sh10
-rw-r--r--src/core/libs/lib-ui-interactive.sh4
2 files changed, 7 insertions, 7 deletions
diff --git a/src/core/libs/lib-pacman.sh b/src/core/libs/lib-pacman.sh
index f087c83..2b1220e 100644
--- a/src/core/libs/lib-pacman.sh
+++ b/src/core/libs/lib-pacman.sh
@@ -138,22 +138,22 @@ list_packages ()
}
# find out the group to which one or more packages belong
-# $1 packages separated by spaces
+# arguments: packages
# output format: multiple lines, each line like:
# <pkgname> <group>
# order is the same as the input
which_group ()
{
- PACKAGE_GROUPS=`LANG=C $PACMAN_TARGET -Si $1 | awk '/^Name/{ printf("%s ",$3) } /^Group/{ print $3 }'`
+ PACKAGE_GROUPS=`LANG=C $PACMAN_TARGET -Si "$@" | awk '/^Name/{ printf("%s ",$3) } /^Group/{ print $3 }'`
}
# get group and packagedesc for packages
-# $1 packages separated by spaces
+# 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 $1 | 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