From: Jason Parker Date: Wed, 16 Jan 2013 21:13:53 +0000 (+0000) Subject: Reduce number of packages install_prereq installs on Debian systems. X-Git-Tag: 12.0.0-alpha1~1068 X-Git-Url: http://git.asterisk.org/gitweb/?p=asterisk%2Fasterisk.git;a=commitdiff_plain;h=73b33dbacf42aacea68d9c9f15b7248f2dbd943a;hp=9b6d9bcf995264b862da3d79f8c5668e82e278b5 Reduce number of packages install_prereq installs on Debian systems. 'search' will look for any package containing the name provided, so we need to force a more exact search. ........ Merged revisions 379276 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 379277 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379278 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/contrib/scripts/install_prereq b/contrib/scripts/install_prereq index 1359f9b..8fc66cc 100755 --- a/contrib/scripts/install_prereq +++ b/contrib/scripts/install_prereq @@ -50,8 +50,12 @@ in_test_mode() { } check_installed_debs() { - aptitude -F '%c %p' search "$@" 2>/dev/null \ - | awk '/^p/{print $2}' + for pack in "$@" + do + tocheck="${tocheck} ^${pack}$" + done + aptitude -F '%c %p' search ${tocheck} 2>/dev/null \ + | awk '/^p/{print $2}' } # parsing the output of yum is close to impossible.