]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Reduce number of packages install_prereq installs on Debian systems.
authorJason Parker <jparker@digium.com>
Wed, 16 Jan 2013 21:12:36 +0000 (21:12 +0000)
committerJason Parker <jparker@digium.com>
Wed, 16 Jan 2013 21:12:36 +0000 (21:12 +0000)
'search' will look for any package containing the name provided, so we need to
force a more exact search.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@379276 65c4cc65-6c06-0410-ace0-fbb531ad65f3

contrib/scripts/install_prereq

index cc09f9b1cffb86d8ba3facefe36c7295546edaf8..669e69314155cf7ecc788a2550d65c40daa19b26 100755 (executable)
@@ -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.