[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] LibreOffice packaging repository branch, ubuntu-oneiric-3.4, updated. libreoffice_3.4.1-1-148-g3521157



The following commit has been merged in the ubuntu-oneiric-3.4 branch:
commit 74f8737cefa64b55b8771b7bce5cc8b261c91d82
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Tue Jul 19 17:26:23 2011 +0200

    some more tweaking on get_libebook_dep.sh

diff --git a/scripts/get_libebook_dep.sh b/scripts/get_libebook_dep.sh
index 25d10bf..2ec5afa 100755
--- a/scripts/get_libebook_dep.sh
+++ b/scripts/get_libebook_dep.sh
@@ -1,27 +1,29 @@
 #!/bin/sh
 
-libs=`grep -o libebook.*\.so build/connectivity/source/drivers/evoab2/EApi.cxx|sort|uniq`
+libs=`grep -o libebook.*\.so.[0-9]* build/connectivity/source/drivers/evoab2/EApi.cxx`
 for l in $libs; do
 	echo "Testing candidate library $l" >&2
-	if [ -e "/usr/lib/$l" ]; then
+	libdir=/usr/lib
+	if [ `dpkg-architecture -qDEB_BUILD_ARCH` = "amd64" ]; then
+		libdir=/usr/lib`dpkg-architecture -qDEB_BUILD_ARCH_BITS`
+	fi
+	if [ -e "$libdir/$l" ]; then
 		# sanity check: do the libs match with what we would get
 		# for our libebook version if we followed the .so symlink?
-		l1=`readlink /usr/lib/$l`
-		l2_tmp=`echo $l | perl -pe 's/(.*)\.\d+$/$1/'`
-		l2=`readlink /usr/lib/$l2_tmp`
+		l1=`readlink $libdir/$l`
+		l2_tmp=`echo $l | grep -o libebook.*\.so`
+		l2=`readlink $libdir/$l2_tmp`
 		if [ "$l1" = "$l2" ]; then
-			dep=`dpkg -S /usr/lib/$l | cut -d: -f1`
+			dep=`dpkg -S $l1 | cut -d: -f1`
+			# exit on success, we want the first (highest matching) API version
+			echo $dep
+			exit 0
 		else
 			echo "$l failed sanity check, because $l1 is not $l2." >&2
 		fi
 	fi
 done
 
-if [ -n "$dep" ]; then
-	echo $dep
-else
-	echo "Cannot find libebook dependency. None of the following libs found:" >&2
-	echo $libs >&2
-	exit 1
-fi
-
+echo "Cannot find libebook dependency. None of the following libs found:" >&2
+echo $libs >&2
+exit 1

-- 
LibreOffice packaging repository


Reply to: