install_prereq: Fix check_installed_debs remove subversion

check_installed_debs wasn't handling virtual packages like libsrtp-dev and
libresample-dev and on multiarch systems it was accidentally filtering out all
packages if any :i386 packages were found instead of just filtering out the
:i386 packages themselves.

Change-Id: Ifd68da0d1ee30cc84df14de3f9b9079d7c3cecda
This commit is contained in:
George Joseph
2016-04-03 10:47:30 -06:00
committed by Richard Mudgett
parent 433d2c4bbf
commit 060b7b83bc

View File

@@ -66,13 +66,12 @@ in_test_mode() {
} }
check_installed_debs() { check_installed_debs() {
for pack in "$@" for pack in "$@" ; do
do tocheck="${tocheck} ^${pack}$ ~P^${pack}$"
tocheck="${tocheck} ^${pack}$"
done done
pkgs=$(aptitude -F '%c %p' search ${tocheck} 2>/dev/null | awk '/^p/{print $2}') pkgs=$(aptitude -F '%c %p' search ${tocheck} 2>/dev/null | awk '/^p/{print $2}')
if ! [ ${#pkgs} -eq 0 ]; then if [ ${#pkgs} -ne 0 ]; then
echo $pkgs | grep -v ':i386$' echo $pkgs | sed -r -e "s/ ?[^ :]+:i386//g"
fi fi
} }