diff options
author | josch <j.schauer@email.de> | 2014-12-25 15:36:52 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2014-12-25 16:12:58 +0100 |
commit | 9280f1c87192d58b06151222af4dd657dd89a104 (patch) | |
tree | 3ab5f09feaad08b781e178f35c41deb222403728 | |
parent | 876d1d82cd0eb4f589e2661765ebec98becadde7 (diff) | |
download | jenkins.debian.net-9280f1c87192d58b06151222af4dd657dd89a104.tar.xz |
Temporary ugly hack until Jenkins runs Debian Jessie
- workaround for `dpkg-deb --ctrl-tarfile /dev/stdin` not being
available in Wheezy
- Python arpy was the only implementation I found which allows to read
an ar archive from standard input without a filename (thus preserving
the ability to quit a package download early)
- since tar cannot transparently decompress content from standard
input (bug #773912), this has to be done in Python, too
- this is also ugly because Python does not work well for oneliners
- please revert this commit as soon as Jenkins run Jessie because dpkg
is also faster than Python arpy
-rwxr-xr-x | bin/find_dpkg_trigger_cycles.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/find_dpkg_trigger_cycles.sh b/bin/find_dpkg_trigger_cycles.sh index d0c9afbd..09a7545a 100755 --- a/bin/find_dpkg_trigger_cycles.sh +++ b/bin/find_dpkg_trigger_cycles.sh @@ -157,7 +157,7 @@ curl "http://binarycontrol.debian.net/?q=&path=%2Ftriggers%24&format=pkglist" \ echo "working on $pkg..." >&2 mkdir DEBIAN curl --retry 2 --location --silent "$url" \ - | dpkg-deb --ctrl-tarfile /dev/stdin \ + | python -c 'exec("import arpy,sys,gzip,bz2,lzma,StringIO\nar=arpy.Archive(fileobj=sys.stdin)\nfor f in ar:\n\tif f.header.name == \"control.tar.gz\":\n\t\tsys.stdout.write(gzip.GzipFile(fileobj=StringIO.StringIO(f.read())).read())\n\t\tbreak\n\telif f.header.name == \"control.tar\":\n\t\tsys.stdout.write(f.read())\n\t\tbreak\n\telif f.header.name == \"control.tar.bz2\":\n\t\tsys.stdout.write(bz2.BZ2File(fileobj=StringIO.StringIO(f.read())).read())\n\t\tbreak\n\telif f.header.name == \"control.tar.xz\":\n\t\tsys.stdout.write(lzma.LZMAFile(fileobj=StringIO.StringIO(f.read())).read())\n\t\tbreak")' \ | tar -C "DEBIAN" --exclude=./md5sums -x if [ ! -f DEBIAN/triggers ]; then rm -r DEBIAN |