[Pkg-kde-commits] rev 1160 - scripts
Pierre Habouzit
madcoder-guest@costa.debian.org
Mon, 30 May 2005 12:16:06 +0000
Author: madcoder-guest
Date: 2005-05-30 12:16:06 +0000 (Mon, 30 May 2005)
New Revision: 1160
Modified:
scripts/check-shlibs2
Log:
fixes + $2 allow now to restrict the search for only one subpackage + VERBOSE to control diff verbosity
Modified: scripts/check-shlibs2
===================================================================
--- scripts/check-shlibs2 2005-05-30 12:14:39 UTC (rev 1159)
+++ scripts/check-shlibs2 2005-05-30 12:16:06 UTC (rev 1160)
@@ -9,15 +9,30 @@
# the version as an argument
#
[ -n "$1" ] || {
- echo "usage: check-shlibs2 version"
+ echo "usage: check-shlibs2 version [package]"
echo
echo " version the version (with revision) that has been uploaded last"
echo " this version is used to perform the symbols analysis"
+ echo " package only do the check for the subpackage package"
exit 1
}
+
LAST_VERSION=$1
+
+if [ -n "$2" ]; then
+ PKG_LIST="$2"
+else
+ PKG_LIST=`/usr/lib/cdbs/list-packages arch`
+fi
+
#
#####################################################################
+# CONFIG
+#
+POOL=${POOL:-'http://ftp.debian.org/debian/pool'}
+VERBOSE=
+#
+#####################################################################
dh_testdir || exit 1
eval `dpkg-architecture`
@@ -27,7 +42,6 @@
VERSION=`dpkg-parsechangelog | grep -E '^Version:' | cut -f 2 -d ' '`
SHLIBS_SVN='svn://svn.debian.org/pkg-kde/branches/kde-3.4.0/shlibs'
WHERE=debian/shlibs-check
-POOL=${POOL:-'http://ftp.debian.org/debian/pool'}
perror() {
echo >&2 "$1"
@@ -73,12 +87,11 @@
if wget -q $URL; then
test -d $TMP || mkdir -p $TMP 2>/dev/null
- dpkg -x $PKG $TMP
+ dpkg -x $PKG $TMP 2>/dev/null
make_symbols_tree $TMP $WHERE/$SOURCE.old/$BASE
rm -rf $PKG debian/old
else
perror "E: Couldn't get the package $PKG."
- exit 1
fi
}
@@ -91,12 +104,14 @@
# and the last uploaded package are the same
#
check_symbols_equal () {
- test -d $WHERE/$SOURCE/$p || return
+ test -d $WHERE/$SOURCE/$1 || return
- if diff -NrU0 $WHERE/$SOURCE.old/$p $WHERE/$SOURCE/$p; then
- perror "-- $p has no differences"
+ [ -n "$VERBOSE" ] || SILENT=-q
+
+ if diff $SILENT -NrU0 $WHERE/$SOURCE.old/$1 $WHERE/$SOURCE/$1; then
+ perror "-- $1 has no differences"
else
- perror "** $p has differences"
+ perror "** $1 has differences"
fi
}
@@ -105,7 +120,7 @@
rm -rf $WHERE
-for p in `/usr/lib/cdbs/list-packages arch`; do
+for p in $PKG_LIST; do
make_old_symbols $p
make_symbols_tree debian/$p $WHERE/$SOURCE/$p
check_symbols_equal $p