eb --force -b -D builds instead of just doing a dry run
Hello,
I just found that when combining the following options the -D seems to have no effect:
$ eb pandas-0.12.0-goolf-1.4.10-Python-2.7.9.eb --pretend --robot ~/prod-easyconfigs --force -b -D
== temporary log file in case of crash /tmp/eb-Eo7wzL/easybuild-93TPUP.log
== resolving dependencies ...
== processing EasyBuild easyconfig /net/home/marcherm/work/pandas-0.12.0-goolf-1.4.10-Python-2.7.9.eb
== building and installing pandas/0.12.0-goolf-1.4.10-Python-2.7.9...
== fetching files...
== creating build dir, resetting environment...
== unpacking...
== patching...
== preparing...
== configuring...
== building...
...
The -b (short for --only-blocks) option takes an argument, so it seems like the cmdline option parser is eating up -D as an argument to -b.
If you switch -b and -D around, do you still see the problem?
@serverhorror: ping?
OK, reproduced:
$ eb bzip2-1.0.6.eb -b -D
== temporary log file in case of crash /tmp/eb-B7UgNy/easybuild-1Lp1os.log
== bzip2/1.0.6 is already installed (module found), skipping
== No easyconfigs left to be built.
== Build succeeded for 0 out of 0
== temporary log file(s) /tmp/eb-B7UgNy/easybuild-1Lp1os.log* have been removed.
== temporary directory /tmp/eb-B7UgNy has been removed.
$ eb bzip2-1.0.6.eb -D -b
Couldn't import dot_parser, loading of dot files will not be possible.
Usage: eb [options] easyconfig [...]
eb: error: -b option requires an argument
This is a very weird issue, the option parser should never ever consider strings that start with - as an argument to an option.
cc @stdweird
The --short-search/-S option suffers from the same issue:
$ eb bzip2-1.0.6.eb -D -S
Couldn't import dot_parser, loading of dot files will not be possible.
Usage: eb [options] easyconfig [...]
eb: error: -S option requires an argument
$ eb bzip2-1.0.6.eb -S -D
Couldn't import dot_parser, loading of dot files will not be possible.
== temporary log file in case of crash /tmp/eb-KOwiI8/easybuild-NNkVSp.log
== Searching (case-insensitive) for '-D' in /Users/kehoste/work/easybuild-easyconfigs/easybuild/easyconfigs
...
Common pattern: the action for both the --only-blocks and --short-search options is store and they are also a single-letter option (-b, -S). Options that have a store_or_None action (e.g., --robot/-r) don't suffer from this.
https://github.com/hpcugent/vsc-base/blob/master/lib/vsc/utils/generaloption.py#L201 explains why this doesn't occur for store_or_None options.
Apparently the standard Python option parser happily allows that options (i.e. strings that start with -) are being consumed as values to other options... :-1
I'll see if we can get this fixed in vsc-base, which hosts the option parser used by EasyBuild; see https://github.com/hpcugent/vsc-base/issues/184.
https://github.com/hpcugent/vsc-base/issues/185 which fixes this problem in the option parser we use has been merged, I'll look into enabling it in the EasyBuild framework, so this should be fixed in EasyBuild v2.4.0.
Cleaning up old issues on my profile