[reprotest] 01/01: Deprecate the --dont-vary flag

Ximin Luo infinity0 at debian.org
Wed Sep 13 12:00:29 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 17d4347dc4e9efa5f200f3abf1c1d0bda3fbf1e3
Author: Ximin Luo <infinity0 at debian.org>
Date:   Wed Sep 13 13:59:17 2017 +0200

    Deprecate the --dont-vary flag
---
 README.rst              |  6 ++----
 debian/changelog        |  6 +++++-
 reprotest/__init__.py   | 12 ++++++------
 tests/test_reprotest.py |  2 +-
 4 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/README.rst b/README.rst
index d3cbed1..c541cc0 100644
--- a/README.rst
+++ b/README.rst
@@ -148,7 +148,7 @@ A sample config file is below::
     variations =
       environment
       build_path
-      user_group
+      user_group.available+=builduser:builduser
       fileordering
       home
       kernel
@@ -159,8 +159,6 @@ A sample config file is below::
       umask
     store_dir =
       /home/foo/build/reprotest-artifacts
-    user_groups =
-      builduser:builduser
 
     [diff]
     diffoscope_arg =
@@ -239,6 +237,6 @@ hard-to-diagnose problems. In the past, this has included:
   bash and probably certain other packages using autotools.
 
 If you see a difference that you really think should not be there, try passing
-``--dont-vary time`` to reprotest, and/or check our results on
+``--variations=-time`` to reprotest, and/or check our results on
 https://tests.reproducible-builds.org/ which use a different (more reliable)
 mechanism to vary the system time.
diff --git a/debian/changelog b/debian/changelog
index e841fd1..84d5080 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,7 @@
 reprotest (0.7) UNRELEASED; urgency=medium
 
   FIXME do not release
-  - update the docs
+  - update the docs on --variations
 
   [ Ximin Luo ]
   * Document when one should use --diffoscope-args=--exclude-directory-metadata
@@ -10,6 +10,10 @@ reprotest (0.7) UNRELEASED; urgency=medium
   * Import autopkgtest 4.4, with minimal patches.
   * Choose an existent HOME for the control build. (Closes: #860428)
   * Add the ability to vary the user (Closes: #872412)
+  * Heavy refactoring to support > 2 builds.
+  * Add a variation config language to be able to configure the specifics of
+    different variations, and to make it easier to configure further builds.
+  * Deprecate the --dont-vary flag.
 
   [ Mattia Rizzolo ]
   * Bump Standards-Version to 4.0.0.
diff --git a/reprotest/__init__.py b/reprotest/__init__.py
index e9a07b6..a0c9035 100644
--- a/reprotest/__init__.py
+++ b/reprotest/__init__.py
@@ -356,11 +356,8 @@ def cli_parser():
     group1.add_argument('--variations', default=["+all"], action='append',
         help='Build variations to test as a whitespace-or-comma-separated '
         'list.  Default is to test all available variations: %(default)s.')
-    # TODO: hide this from --help, and deprecate it
-    group1.add_argument('--dont-vary', default=[], action='append',
-        help='Build variations *not* to test as a whitespace-or-comma-separated '
-        'list.  These take precedence over what you set for --variations. '
-        'Default is nothing, i.e. test whatever you set for --variations.')
+    # TODO: remove after reprotest 0.8
+    group1.add_argument('--dont-vary', default=[], action='append', help=argparse.SUPPRESS)
 
     group2 = parser.add_argument_group('diff options')
     group2.add_argument('--diffoscope-arg', default=[], action='append',
@@ -501,7 +498,10 @@ def run(argv, check):
             diffoscope_args = values.diffoscope_args + diffoscope_args
 
     # Variations args
-    variations = parsed_args.variations + ["-%s" % a for x in parsed_args.dont_vary for a in x.split(",")]
+    variations = parsed_args.variations
+    if parsed_args.dont_vary:
+        logging.warn("--dont-vary is deprecated; use --variations=-$variation instead")
+        variations += ["-%s" % a for x in parsed_args.dont_vary for a in x.split(",")]
     spec = VariationSpec().extend(variations)
     variations = Variations(verbosity, spec)
 
diff --git a/tests/test_reprotest.py b/tests/test_reprotest.py
index 48984d4..03cf4a9 100644
--- a/tests/test_reprotest.py
+++ b/tests/test_reprotest.py
@@ -14,7 +14,7 @@ REPROTEST_TEST_SERVERS = os.getenv("REPROTEST_TEST_SERVERS", "null").split(",")
 REPROTEST_TEST_DONTVARY = os.getenv("REPROTEST_TEST_DONTVARY", "").split(",")
 
 if REPROTEST_TEST_DONTVARY:
-    REPROTEST += ["--dont-vary", ",".join(REPROTEST_TEST_DONTVARY)]
+    REPROTEST += ["--variations=-" + ",-".join(REPROTEST_TEST_DONTVARY)]
 
 TEST_VARIATIONS = frozenset(reprotest.build.VARIATIONS.keys()) - frozenset(REPROTEST_TEST_DONTVARY)
 

-- 
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