From fbe27630991806aac299f7a6eadeb1e62a2352e7 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 30 Oct 2013 13:25:27 -0400 Subject: [PATCH] BF: some bugfixes for nd_build_testrdepends --- tools/nd_build_testrdepends | 7 +++++-- tools/nd_fetch_bdepends | 17 +++++++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/tools/nd_build_testrdepends b/tools/nd_build_testrdepends index f24c793..28a820d 100755 --- a/tools/nd_build_testrdepends +++ b/tools/nd_build_testrdepends @@ -28,9 +28,12 @@ srcdir=$testdir/srcs oldbuildsdir=$srcdir/old newbuildsdir=$srcdir/new -echo "I: Building the new package for $pkg" +echo "I: Updating target chroot $family $dist" +$CMD nd_updatedist $family $dist $arch mkdir -p $debdir $srcdir $bindir $secdir + +echo "I: Building the new package for $pkg" $CMD nd_build $family $dist $arch $dscfile --buildresult=$debdir echo "I: Initiating the repository" @@ -77,7 +80,7 @@ cd - > /dev/null 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 $srcdir $pkgs +$CMD nd_execute $family $dist $arch --bindmounts $testdir $bindir/nd_fetch_bdepends $dist $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 5c674f8..f769de1 100755 --- a/tools/nd_fetch_bdepends +++ b/tools/nd_fetch_bdepends @@ -1,21 +1,34 @@ #!/bin/bash -tdir=$1 +dist=$1 +tdir=$2 +shift shift # provide deb-src by uncommenting +echo "D: adjusting the sources" sed -i -e 's,^#deb-src,deb-src,g' /etc/apt/sources.list +echo "D: now have" +cat /etc/apt/sources.list mkdir -p $tdir cd $tdir apt-get update apt-get install -y devscripts dctrl-tools rm -f build-rdeps.output +echo "D: querying rdepds for $@" + +# D: interactive shell for debugging +# /bin/bash < /dev/tty > /dev/tty 2> /dev/tty + for pkg in "$@"; do - build-rdeps $pkg >> build-rdeps.output + build-rdeps --distribution $dist $pkg >> build-rdeps.output done +echo "D: got rdepds:" +cat build-rdeps.output + # Fetch all the sources grep -v -e '^[-A-Z]' -e '^ *$' build-rdeps.output \ | sort | uniq \ -- 2.39.2