X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/28f48d700b01c6145eb05dc78d54b10552f32803..6cf97414024dc9990deba102761ae5951da0200d:/bin/mdw-sbuild-server diff --git a/bin/mdw-sbuild-server b/bin/mdw-sbuild-server index 048fcbe..705592b 100755 --- a/bin/mdw-sbuild-server +++ b/bin/mdw-sbuild-server @@ -137,6 +137,7 @@ case "$#,$1" in ## racing with another process, but that's why we're trying in a loop. if mkdir "$ver#$nn" >/dev/null 2>&1; then winp=t + cd "$ver#$nn" break fi @@ -149,6 +150,9 @@ case "$#,$1" in ## Make sure we actually succeeded. case $winp in t) ;; *) fail "failed to create build directory" ;; esac + ## Make an empty directory for dependency packages. + mkdir -p pkgs/ + ## Done. echo "$buildroot/$dist#$nn" ;; @@ -245,6 +249,18 @@ case "$#,$1" in nil) firstopt="$firstopt --debbuildopt=-A" ;; esac + ## Sort out the additional packages. This is rather annoying, because + ## sbuild(1) does this in a really stupid way. + rm -rf pkgs.* + for a in $buildarchs; do + mkdir pkgs.$a + for f in $(dpkg-scanpackages -a$a pkgs/ | + sed -n '/^Filename: /s///p') + do + ln $f pkgs.$a/ + done + done + ## Build a cheesy makefile to run these in parallel. cat >build.mk <build-status.\$\$full; \\ sbuild \\ + --extra-package=pkgs.\$\$target/ \\ --dist=\$\$suite --build=\$\$host --host=\$\$target \\ --chroot=\$\$suite-\$\$host --verbose \$1 \$(DSC); \\ rc=\$\$?; case \$\$rc in \\