diff options
author | mvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-07-24 14:39:47 +0000 |
---|---|---|
committer | mvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-07-24 14:39:47 +0000 |
commit | 48fcb5c881bde77b2f6cb48a845f8a764ed3d1c4 (patch) | |
tree | e895217982ef4573dbbe6d503fe5bf20f251807f /contrib | |
parent | add578d8e44ce31198cee760214cc482ba227812 (diff) |
Merged revisions 208542 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r208542 | mvanbaak | 2009-07-24 16:35:49 +0200 (Fri, 24 Jul 2009) | 13 lines
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: http://svn.digium.com/svn/asterisk/branches/1.6.2@208545 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/scripts/install_prereq | 7 |
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() { |