Hi, Attached is the following:
commit 04506ef56be76324a5f531f5b436facc93da77db Author: Chris Lamb <la...@debian.org> Date: Mon Nov 7 13:23:37 2016 +0000 reproducible Debian: correct syntax for Python 3. bin/reproducible_create_meta_pkg_sets.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b686ae15509e5a8dff093908b6ae8d03a9294fab Author: Chris Lamb <la...@debian.org> Date: Mon Nov 7 13:24:04 2016 +0000 reproducible Debian: might as well show the exception bin/reproducible_create_meta_pkg_sets.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 91e10449b38f1cb6d5a7ebbc45a308ccf07e20b6 Author: Chris Lamb <la...@debian.org> Date: Mon Nov 7 13:24:34 2016 +0000 reproducible Debian: Usual syntax is "if X not in Y" rather than "if not X in Y". bin/reproducible_create_meta_pkg_sets.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de3c752982c2f4a762ef8fa27a1b6728b2aa1216 Author: Chris Lamb <la...@debian.org> Date: Mon Nov 7 13:25:37 2016 +0000 reproducible Debian: no need for a dictionary; let's just use a set. bin/reproducible_create_meta_pkg_sets.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9a799d88a16a2bc08ecbb7f204bab57628ffddb4 Author: Chris Lamb <la...@debian.org> Date: Mon Nov 7 13:26:43 2016 +0000 reproducible Debian: actually wrap the bit that can fail in th try-except! bin/reproducible_create_meta_pkg_sets.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 8309468c3378df91ca09aa8cd100c6ab326548fa Author: Chris Lamb <la...@debian.org> Date: Mon Nov 7 13:27:59 2016 +0000 reproducible Debian: no need to wrap the bits that won't fail in the try-except. bin/reproducible_create_meta_pkg_sets.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) You can also merge from the "fix-tails_build_manifest_to_deb822-python-snippet" branch of https://github.com/lamby/jenkins.debian.net if that is more convenient. Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
From 8309468c3378df91ca09aa8cd100c6ab326548fa Mon Sep 17 00:00:00 2001 From: Chris Lamb <la...@debian.org> Date: Mon, 7 Nov 2016 13:27:59 +0000 Subject: [PATCH 6/6] reproducible Debian: no need to wrap the bits that won't fail in the try-except. --- bin/reproducible_create_meta_pkg_sets.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/bin/reproducible_create_meta_pkg_sets.sh b/bin/reproducible_create_meta_pkg_sets.sh index 38b27fb..c953049 100755 --- a/bin/reproducible_create_meta_pkg_sets.sh +++ b/bin/reproducible_create_meta_pkg_sets.sh @@ -34,15 +34,16 @@ import yaml try: with open(sys.argv[1]) as fd: manifest = yaml.load(fd) - seen = set() - for pkg in (manifest['packages']['binary'] + manifest['packages']['source']): - pkgname = pkg['package'] - if pkgname not in seen: - print(pkgname, end='|') - seen.add(pkgname) except Exception as exc: print("Warning: something went wrong while parsing the build manifest as YAML file: {}".format(exc)) - + sys.exit(0) + +seen = set() +for pkg in (manifest['packages']['binary'] + manifest['packages']['source']): + pkgname = pkg['package'] + if pkgname not in seen: + print(pkgname, end='|') + seen.add(pkgname) EOF ) grep-dctrl -F Package -e '^('"$ALL_PKGS"')$' $packages > "$tmpfile" -- 2.10.2
From 9a799d88a16a2bc08ecbb7f204bab57628ffddb4 Mon Sep 17 00:00:00 2001 From: Chris Lamb <la...@debian.org> Date: Mon, 7 Nov 2016 13:26:43 +0000 Subject: [PATCH 5/6] reproducible Debian: actually wrap the bit that can fail in th try-except! --- bin/reproducible_create_meta_pkg_sets.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/reproducible_create_meta_pkg_sets.sh b/bin/reproducible_create_meta_pkg_sets.sh index 4662186..38b27fb 100755 --- a/bin/reproducible_create_meta_pkg_sets.sh +++ b/bin/reproducible_create_meta_pkg_sets.sh @@ -31,17 +31,17 @@ tails_build_manifest_to_deb822() { ALL_PKGS=$(python3 - "$tmpfile" <<EOF import sys import yaml -with open(sys.argv[1]) as fd: - manifest = yaml.load(fd) - seen = set() - try: +try: + with open(sys.argv[1]) as fd: + manifest = yaml.load(fd) + seen = set() for pkg in (manifest['packages']['binary'] + manifest['packages']['source']): pkgname = pkg['package'] if pkgname not in seen: print(pkgname, end='|') seen.add(pkgname) - except Exception as exc: - print("Warning: something went wrong while parsing the build manifest as YAML file: {}".format(exc)) +except Exception as exc: + print("Warning: something went wrong while parsing the build manifest as YAML file: {}".format(exc)) EOF ) -- 2.10.2
From de3c752982c2f4a762ef8fa27a1b6728b2aa1216 Mon Sep 17 00:00:00 2001 From: Chris Lamb <la...@debian.org> Date: Mon, 7 Nov 2016 13:25:37 +0000 Subject: [PATCH 4/6] reproducible Debian: no need for a dictionary; let's just use a set. --- bin/reproducible_create_meta_pkg_sets.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/reproducible_create_meta_pkg_sets.sh b/bin/reproducible_create_meta_pkg_sets.sh index e0836cc..4662186 100755 --- a/bin/reproducible_create_meta_pkg_sets.sh +++ b/bin/reproducible_create_meta_pkg_sets.sh @@ -33,13 +33,13 @@ import sys import yaml with open(sys.argv[1]) as fd: manifest = yaml.load(fd) - seen = {} + seen = set() try: for pkg in (manifest['packages']['binary'] + manifest['packages']['source']): pkgname = pkg['package'] if pkgname not in seen: print(pkgname, end='|') - seen[pkgname] = True + seen.add(pkgname) except Exception as exc: print("Warning: something went wrong while parsing the build manifest as YAML file: {}".format(exc)) -- 2.10.2
From 91e10449b38f1cb6d5a7ebbc45a308ccf07e20b6 Mon Sep 17 00:00:00 2001 From: Chris Lamb <la...@debian.org> Date: Mon, 7 Nov 2016 13:24:34 +0000 Subject: [PATCH 3/6] reproducible Debian: Usual syntax is "if X not in Y" rather than "if not X in Y". --- bin/reproducible_create_meta_pkg_sets.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/reproducible_create_meta_pkg_sets.sh b/bin/reproducible_create_meta_pkg_sets.sh index 59d10d4..e0836cc 100755 --- a/bin/reproducible_create_meta_pkg_sets.sh +++ b/bin/reproducible_create_meta_pkg_sets.sh @@ -37,7 +37,7 @@ with open(sys.argv[1]) as fd: try: for pkg in (manifest['packages']['binary'] + manifest['packages']['source']): pkgname = pkg['package'] - if not pkgname in seen: + if pkgname not in seen: print(pkgname, end='|') seen[pkgname] = True except Exception as exc: -- 2.10.2
From b686ae15509e5a8dff093908b6ae8d03a9294fab Mon Sep 17 00:00:00 2001 From: Chris Lamb <la...@debian.org> Date: Mon, 7 Nov 2016 13:24:04 +0000 Subject: [PATCH 2/6] reproducible Debian: might as well show the exception --- bin/reproducible_create_meta_pkg_sets.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/reproducible_create_meta_pkg_sets.sh b/bin/reproducible_create_meta_pkg_sets.sh index c8fdeba..59d10d4 100755 --- a/bin/reproducible_create_meta_pkg_sets.sh +++ b/bin/reproducible_create_meta_pkg_sets.sh @@ -40,8 +40,8 @@ with open(sys.argv[1]) as fd: if not pkgname in seen: print(pkgname, end='|') seen[pkgname] = True - except: - print("Warning: something went wrong while parsing the build manifest as YAML file.") + except Exception as exc: + print("Warning: something went wrong while parsing the build manifest as YAML file: {}".format(exc)) EOF ) -- 2.10.2
From 04506ef56be76324a5f531f5b436facc93da77db Mon Sep 17 00:00:00 2001 From: Chris Lamb <la...@debian.org> Date: Mon, 7 Nov 2016 13:23:37 +0000 Subject: [PATCH 1/6] reproducible Debian: correct syntax for Python 3. --- bin/reproducible_create_meta_pkg_sets.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/reproducible_create_meta_pkg_sets.sh b/bin/reproducible_create_meta_pkg_sets.sh index 7a01ef7..c8fdeba 100755 --- a/bin/reproducible_create_meta_pkg_sets.sh +++ b/bin/reproducible_create_meta_pkg_sets.sh @@ -41,7 +41,7 @@ with open(sys.argv[1]) as fd: print(pkgname, end='|') seen[pkgname] = True except: - print "Warning: something went wrong while parsing the build manifest as YAML file." + print("Warning: something went wrong while parsing the build manifest as YAML file.") EOF ) -- 2.10.2
_______________________________________________ Reproducible-builds mailing list Reproducible-builds@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds