From d9478dd0666ea2f674aac55eba8cc05439d5ea1e Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 18 Jun 2012 15:04:15 -0400 Subject: [PATCH] ENH: nd_build_testrdepends to get names of all binary packages build-depends of which to test --- tools/nd_build_testrdepends | 6 ++++-- tools/nd_fetch_bdepends | 11 ++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/tools/nd_build_testrdepends b/tools/nd_build_testrdepends index a765ee8..cef0ab1 100755 --- a/tools/nd_build_testrdepends +++ b/tools/nd_build_testrdepends @@ -34,12 +34,14 @@ $CMD nd_build $family $dist $arch $dscfile --buildresult=$debdir cd $debdir dpkg-scanpackages . >| Packages +# All binary packages produced +pkgs=$(awk '/^Package:/{print $2;}' Packages) cd - > /dev/null -echo "I: Fetching all bdepends for $pkg in $family $dist under $arch" +echo "I: Fetching all bdepends for $pkgs in $family $dist under $arch" # need first to provide the necessary scripts out there cp -p $(dirname $0)/nd_fetch_bdepends $bindir -$CMD nd_execute $family $dist $arch --bindmounts $testdir $bindir/nd_fetch_bdepends $pkg $srcdir +$CMD nd_execute $family $dist $arch --bindmounts $testdir $bindir/nd_fetch_bdepends $srcdir $pkgs echo "I: preparing the hook" cat << EOF >| $bindir/D00add_custom_repo diff --git a/tools/nd_fetch_bdepends b/tools/nd_fetch_bdepends index ebb5d92..5c674f8 100755 --- a/tools/nd_fetch_bdepends +++ b/tools/nd_fetch_bdepends @@ -1,7 +1,8 @@ #!/bin/bash -pkg=$1 -tdir=$2 +tdir=$1 + +shift # provide deb-src by uncommenting sed -i -e 's,^#deb-src,deb-src,g' /etc/apt/sources.list @@ -10,10 +11,14 @@ mkdir -p $tdir cd $tdir apt-get update apt-get install -y devscripts dctrl-tools -build-rdeps $pkg >| build-rdeps.output +rm -f build-rdeps.output +for pkg in "$@"; do + build-rdeps $pkg >> build-rdeps.output +done # Fetch all the sources grep -v -e '^[-A-Z]' -e '^ *$' build-rdeps.output \ + | sort | uniq \ | tee build-rdeps.list \ | while read pkg; do apt-get source --download-only $pkg -- 2.39.2