[Reproducible-commits] [misc] 02/02: messing around with a build-deps script

Chris West faux-guest at moszumanska.debian.org
Sun Jul 5 11:29:57 UTC 2015


This is an automated email from the git hooks/post-receive script.

faux-guest pushed a commit to branch master
in repository misc.

commit 3cf61a27cddc210c071778542dbeed8adbabd95c
Author: Chris West (Faux) <git at goeswhere.com>
Date:   Sun Jul 5 12:29:36 2015 +0100

    messing around with a build-deps script
---
 .gitignore    |  1 +
 build-deps.sh | 21 +++++++++++++++++++++
 2 files changed, 22 insertions(+)

diff --git a/.gitignore b/.gitignore
index b332698..df2bbf1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
 __pycache__/
 rbuilds
 *.lst
+*.err
diff --git a/build-deps.sh b/build-deps.sh
new file mode 100755
index 0000000..40b38d5
--- /dev/null
+++ b/build-deps.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+set -eu
+
+# requirements: python3-apt debootstrap
+
+SUITE=$1
+MIRROR=$2
+
+DIR=$(mktemp -d)
+debootstrap $SUITE $DIR $MIRROR
+printf "deb $MIRROR $SUITE main\ndeb-src $MIRROR $SUITE main\n" > $DIR/etc/apt/sources.list
+chroot $DIR apt-get update
+python3 -c '
+import apt
+cache=apt.cache.Cache(rootdir="'$DIR'")
+for src in set(v.source_name for p in cache.keys() for v in cache[p].versions):
+    print(src)
+' | pv -l -s 28000 | xargs -P8 -I{} sh -c \
+    'chroot '$DIR' apt-get build-dep --dry-run -oDebug::NoLocking=yes {} >{}.err 2>&1 && rm {}.err'
+rm -rf $DIR
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/misc.git



More information about the Reproducible-commits mailing list