[reprotest] 01/01: main: print a warning message if we reproduced successfully but didn't vary everything
Ximin Luo
infinity0 at debian.org
Mon Sep 25 18:25:57 UTC 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository reprotest.
commit 69677a41f76fc82d684ab76964578e87a38f3aee
Author: Ximin Luo <infinity0 at debian.org>
Date: Mon Sep 25 20:20:31 2017 +0200
main: print a warning message if we reproduced successfully but didn't vary everything
---
reprotest/__init__.py | 4 ++++
reprotest/build.py | 3 +++
2 files changed, 7 insertions(+)
diff --git a/reprotest/__init__.py b/reprotest/__init__.py
index 6487f87..88e721f 100644
--- a/reprotest/__init__.py
+++ b/reprotest/__init__.py
@@ -288,10 +288,14 @@ def check(build_command, source_root, artifact_pattern, store_dir=None, no_clean
run_or_tee(['sh', '-ec', 'find %s -type f -exec sha256sum "{}" \;' % artifact_pattern],
'SHA256SUMS', store_dir,
cwd=os.path.join(local_dists[0], VSRC_DIR))
+ if any(bctx.spec.variations() != VariationSpec.all_names() for bctx in build_variations[1:]):
+ print("However, other factors may still make the build unreproducible; try re-running with --vary=+all.")
+
elif retcode == 1:
if 0 in retcodes.values():
print("Reproduction failed but partially successful: in %s" %
", ".join(name for name, r in retcodes.items() if r == 0))
+
else:
raise RuntimeError("diffoscope exited non-boolean %s" % retcode)
diff --git a/reprotest/build.py b/reprotest/build.py
index 71e0618..03c1d03 100644
--- a/reprotest/build.py
+++ b/reprotest/build.py
@@ -408,6 +408,9 @@ class VariationSpec(mdiffconf.ImmutableNamespace):
def all_names(cls):
return list(VARIATIONS.keys())
+ def variations(self):
+ return [k for k in VARIATIONS.keys() if k in self.__dict__]
+
aliases = { ("@+-", "all"): list(VARIATIONS.keys()) }
def extend(self, actions):
one = self.default()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/reprotest.git
More information about the Reproducible-commits
mailing list