[Asterisk-code-review] install prereq: Fix check installed debs remove subversion (asterisk[13])

George Joseph asteriskteam at digium.com
Sun Apr 3 12:28:24 CDT 2016


George Joseph has uploaded a new change for review.

  https://gerrit.asterisk.org/2527

Change subject: install_prereq:  Fix check_installed_debs remove subversion
......................................................................

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.

Removed subversion.

Change-Id: Ifd68da0d1ee30cc84df14de3f9b9079d7c3cecda
---
M contrib/scripts/install_prereq
1 file changed, 6 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/27/2527/1

diff --git a/contrib/scripts/install_prereq b/contrib/scripts/install_prereq
index afad1f7..834b26b 100755
--- a/contrib/scripts/install_prereq
+++ b/contrib/scripts/install_prereq
@@ -28,12 +28,12 @@
 PACKAGES_DEBIAN="$PACKAGES_DEBIAN libopenh323-dev libvpb-dev libgtk2.0-dev libmysqlclient-dev libbluetooth-dev libradiusclient-ng-dev freetds-dev"
 PACKAGES_DEBIAN="$PACKAGES_DEBIAN libsnmp-dev libiksemel-dev libcorosync-dev libnewt-dev libpopt-dev libical-dev libspandsp-dev libjack-dev"
 PACKAGES_DEBIAN="$PACKAGES_DEBIAN libresample-dev libc-client-dev binutils-dev libsrtp-dev libgsm1-dev libedit-dev doxygen libjansson-dev libldap-dev"
-PACKAGES_DEBIAN="$PACKAGES_DEBIAN subversion git libxslt1-dev automake libsrtp-dev libncurses5-dev python-dev"
+PACKAGES_DEBIAN="$PACKAGES_DEBIAN git libxslt1-dev automake libsrtp-dev libncurses5-dev python-dev"
 PACKAGES_RH="automake gcc gcc-c++ ncurses-devel openssl-devel libxml2-devel unixODBC-devel libcurl-devel libogg-devel libvorbis-devel speex-devel"
 PACKAGES_RH="$PACKAGES_RH spandsp-devel freetds-devel net-snmp-devel iksemel-devel corosynclib-devel newt-devel popt-devel libtool-ltdl-devel lua-devel"
 PACKAGES_RH="$PACKAGES_RH sqlite-devel libsqlite3x-devel radiusclient-ng-devel portaudio-devel postgresql-devel libresample-devel neon-devel libical-devel"
 PACKAGES_RH="$PACKAGES_RH openldap-devel gmime22-devel sqlite2-devel mysql-devel bluez-libs-devel jack-audio-connection-kit-devel gsm-devel libedit-devel libuuid-devel"
-PACKAGES_RH="$PACKAGES_RH jansson-devel libsrtp-devel pjproject-devel subversion git libxslt-devel python-devel"
+PACKAGES_RH="$PACKAGES_RH jansson-devel libsrtp-devel pjproject-devel git libxslt-devel python-devel"
 
 PACKAGES_OBSD="popt gmake wget libxml libogg libvorbis curl iksemel spandsp speex iodbc freetds-0.63p1-msdblib mysql-client gmime sqlite sqlite3 jack libxslt"
 
@@ -66,13 +66,12 @@
 }
 
 check_installed_debs() {
-	for pack in "$@"
-	do
-		tocheck="${tocheck} ^${pack}$"
+	for pack in "$@" ; do
+		tocheck="${tocheck} ^${pack}$ ~P^${pack}$"
 	done
 	pkgs=$(aptitude -F '%c %p' search ${tocheck} 2>/dev/null | awk '/^p/{print $2}')
-	if ! [ ${#pkgs} -eq 0 ]; then
-		echo $pkgs | grep -v ':i386$'
+	if [ ${#pkgs} -ne 0 ]; then
+		echo $pkgs | sed -r -e "s/ ?[^ :]+:i386//g"
 	fi
 }
 

-- 
To view, visit https://gerrit.asterisk.org/2527
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifd68da0d1ee30cc84df14de3f9b9079d7c3cecda
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>



More information about the asterisk-code-review mailing list