From: František Dvořák Date: Mon, 5 Mar 2012 16:12:06 +0000 (+0000) Subject: Lintian check fixes, let's work with package-less build too. X-Git-Tag: glite-jobid-api-c_R_2_1_2_1~68 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=c4c65d029940474798c3f321cb2c1ba05bf2fac6;p=jra1mw.git Lintian check fixes, let's work with package-less build too. --- diff --git a/org.glite.testsuites.ctb/LB/tests/lb-common.sh b/org.glite.testsuites.ctb/LB/tests/lb-common.sh index 874f941..714db42 100755 --- a/org.glite.testsuites.ctb/LB/tests/lb-common.sh +++ b/org.glite.testsuites.ctb/LB/tests/lb-common.sh @@ -392,17 +392,24 @@ function check_lintian() { rm -rf $dir mkdir $dir while test -n "$1"; do - pkgs="$pkgs `dpkg-query -W $1 2>>$dir/query.log | cut -f1` + pkgs="$pkgs `dpkg-query -W "$1" 2>>$dir/query.log | cut -f1` " shift done for pkg in $pkgs; do src=`dpkg-query -W -f '${Source}' $pkg 2>>$dir/query.log` - if [ -z "$src" ]; then src="$pkg"; fi - pkgs="$pkgs + if [ $? -eq 0 ]; then + if [ -z "$src" ]; then src="$pkg"; fi + pkgs="$pkgs $src" + fi done - pkgs=`echo "$pkgs" | sort | uniq` + pkgs=`echo "$pkgs" | sort | uniq | sed 's/^ //'` + + if test -z "$pkgs"; then + echo "No packages to check" + return 0 + fi printf "Downloading packages..." (cd $dir; apt-get -d source $pkgs >$dir/download.log)