[Reproducible-commits] [misc] 02/03: show which changelogs fail to download (WIP, as there is an interesting/annoying bash problem too, see comments in the code
Holger Levsen
holger at layer-acht.org
Mon May 16 16:19:51 UTC 2016
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch master
in repository misc.
commit aed7042bd5906a2b41545af6e501ef6b0aafd08d
Author: Holger Levsen <holger at layer-acht.org>
Date: Mon May 16 18:14:40 2016 +0200
show which changelogs fail to download (WIP, as there is an interesting/annoying bash problem too, see comments in the code
---
reports/bin/get-latest-data | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/reports/bin/get-latest-data b/reports/bin/get-latest-data
index 498b953..b1dadb5 100755
--- a/reports/bin/get-latest-data
+++ b/reports/bin/get-latest-data
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
set -e
# if you want to use torsocks:
# export TORSOCKS=torsocks
@@ -40,12 +40,28 @@ $TORSOCKS wget -q -N https://reproducible.debian.net/reproducible.db
echo >&2 "- changelogs of newly-reproducible packages"
mkdir -p changelogs
+export failed_urls=$(mktemp)
for url in $("$scriptdir/newly-reproducible" -w "$week" | sed -n -e 's,.*<,,;s,>.*,,p' | sort -u); do
p=${url%/*}; p=${p##*/};
- $TORSOCKS wget -q -O changelogs/$p "$url" || true
+ echo -n " * $p"
+ $TORSOCKS wget -q -O changelogs/$p "$url" || ( echo $url >> $failed_urls ; echo -n " failed.")
+ echo
done
+# i'd love to move this codeblock to the end and remove the read command
+# but see the last two lines of this script…
+if [ -s $failed_urls ] ; then
+ echo
+ echo "these urls could not be downloaded: (please investigate and download manually)"
+ echo
+ cat $failed_urls
+ echo
+ echo "(press enter to continue)"
+ read
+fi
+rm -f $failed_urls
+
echo >&2 "- bug reports that were modified (via ssh to alioth)"
echo "SELECT DISTINCT bugs.id FROM bugs_usertags, bugs WHERE email = 'reproducible-builds at lists.alioth.debian.org' AND bugs.id = bugs_usertags.id AND bugs.last_modified > to_timestamp($week_start) AND bugs.last_modified < to_timestamp($week_end) ORDER BY bugs.id;" \
| ssh alioth.debian.org psql service=udd -t \
@@ -53,3 +69,6 @@ echo "SELECT DISTINCT bugs.id FROM bugs_usertags, bugs WHERE email = 'reproducib
)
rm -f latest && ln -sf "data/$week_path" latest
+
+# this prints an empty line but should not. i dont get it.
+echo $failed_urls
--
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