[reprotest] 01/01: Don't repeat documentation in two different places, move it all to --help

Ximin Luo infinity0 at debian.org
Thu Sep 22 18:49:07 UTC 2016


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository reprotest.

commit 714cf5bdf5b40f723d3f937a803c12b19914779f
Author: Ximin Luo <infinity0 at debian.org>
Date:   Thu Sep 22 20:44:39 2016 +0200

    Don't repeat documentation in two different places, move it all to --help
---
 README.md             | 22 +++-------------------
 reprotest/__init__.py | 19 ++++++++++++-------
 2 files changed, 15 insertions(+), 26 deletions(-)

diff --git a/README.md b/README.md
index 2e2e64f..01375d9 100644
--- a/README.md
+++ b/README.md
@@ -23,24 +23,8 @@ If your build artifacts have spaces in their names, you will need to
 quote these twice, e.g. `'"a file with spaces.gz"'` for a single
 artifact or `'"dir 1"/* "dir 2"/*'` for multiple patterns.
 
-For optional arguments, it has:
-
-`--variations`, which accepts a list of possible build variations to
-test, one or more of 'captures_environment', 'domain_host',
-'filesystem', 'home', 'kernel', 'locales', 'path', 'shell', 'time',
-'timezone', 'umask', and 'user_group' (see
-[variations](https://tests.reproducible-builds.org/index_variations.html)
-for more information);
-
-`--dont_vary`, which makes reprotest *not* test any variations in the
-given list (the default is to run all variations);
-
-`--source_root`, which accepts a directory to run the build command
-in and defaults to the current working directory; and
-
-`--verbose`, which will eventually enable more detailed logging.
-
-To get help for the CLI, run `reprotest -h` or `reprotest --help`.
+To get more help for the CLI, including documentation on optional
+arguments and what they do, run `reprotest --help`.
 
 
 Config File
@@ -48,7 +32,7 @@ Config File
 
 The config file has one section, basics, and the same options as the
 CLI, except there's no dont_vary option, and there are `build_command`
-and `artifact` options.  If `build_command` and/or `artifact` are set
+and `artifact` fields.  If `build_command` and/or `artifact` are set
 in the config file, reprotest can be run without passing those as
 command-line arguments.  Command-line arguments always override config
 file options.  Reprotest currently searches the working directory for
diff --git a/reprotest/__init__.py b/reprotest/__init__.py
index 60dc622..5532443 100644
--- a/reprotest/__init__.py
+++ b/reprotest/__init__.py
@@ -378,14 +378,19 @@ COMMAND_LINE_OPTIONS = types.MappingProxyType(collections.OrderedDict([
         'current working directory.'})),
     ('--variations', types.MappingProxyType({
         'type': lambda s: frozenset(s.split(',')),
-        'help': 'Build variations to test as a comma-separated list'
-        ' (without spaces).  Default is to test all available '
-        'variations.'})),
+        'default': frozenset(VARIATIONS.keys()),
+        'help': 'Build variations to test as a comma-separated list '
+        '(without spaces).  Default is to test all available '
+        'variations: %s; see https://tests.reproducible-builds.org/index_variations.html '
+        'for more information.' % ', '.join(VARIATIONS.keys())})),
     ('--dont-vary', types.MappingProxyType({
-        'dest': 'dont_vary', 'type': lambda s: frozenset(s.split(',')),
-        'help': 'Build variations *not* to test as a comma-separated'
-        ' list (without spaces).  Default is to test all available '
-        ' variations.'})),
+        'dest': 'dont_vary',
+        'type': lambda s: frozenset(s.split(',')),
+        'default': frozenset(),
+        'help': 'Build variations *not* to test as a comma-separated '
+        'list (without spaces).  These take precedence over what '
+        'you set for "variations". Default is nothing, i.e. test '
+        'whatever you set for "variations".'})),
     ('--no-clean-on-error', types.MappingProxyType({
         'action': 'store_true', 'default': False,
         'help': 'Don\'t clean the virtual_server if there was an error. '

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