summaryrefslogtreecommitdiff
path: root/contrib/scripts/install_prereq
diff options
context:
space:
mode:
authorMichiel van Baak <michiel@vanbaak.info>2009-07-24 14:35:49 +0000
committerMichiel van Baak <michiel@vanbaak.info>2009-07-24 14:35:49 +0000
commit3ee2e7566fde543be671e8edeba7420aca91641e (patch)
treeb34c32952f92006a55097f41aa50861128ea932c /contrib/scripts/install_prereq
parent347665503eb66e18a51adca50a36851d662ebd73 (diff)
use aptitude for debian based systems
The function to check wether we need to install packages was using dpkg-query which was gives wrong output on Debian 5 Also, the apt-get has been replaced with aptitude because aptitude is now the preferred way to handle packages on Debian (closes issue #15570) Reported by: mvanbaak Patches: 2009072400_installprereq-aptitude.diff uploaded by mvanbaak (license 7) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@208542 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'contrib/scripts/install_prereq')
-rwxr-xr-xcontrib/scripts/install_prereq7
1 files changed, 3 insertions, 4 deletions
diff --git a/contrib/scripts/install_prereq b/contrib/scripts/install_prereq
index 8770b9f59..ddb3f1aee 100755
--- a/contrib/scripts/install_prereq
+++ b/contrib/scripts/install_prereq
@@ -45,10 +45,9 @@ in_test_mode() {
test "$testcmd" != ''
}
-# Fixme: should be done by apt and not by dpkg?
check_installed_debs() {
- dpkg-query -W --showformat '${Status} ${Package}\n' "$@" 2>/dev/null \
- | awk '/ not-installed/{print $4}'
+ aptitude -F '%c %p' search "$@" 2>/dev/null \
+ | awk '/^p/{print $2}'
}
# parsing the output of yum is close to impossible.
@@ -65,7 +64,7 @@ check_installed_rpms() {
handle_debian() {
# echo "# Distribution is Debian or compatible"
extra_packs=`check_installed_debs $PACKAGES_DEBIAN`
- $testcmd apt-get install -y $extra_packs
+ $testcmd aptitude install -y $extra_packs
}
handle_rh() {