Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eb --force -b -D builds instead of just doing a dry run #113

Closed
serverhorror opened this issue Apr 3, 2015 · 8 comments
Closed

eb --force -b -D builds instead of just doing a dry run #113

serverhorror opened this issue Apr 3, 2015 · 8 comments
Milestone

Comments

@serverhorror
Copy link

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...
...
@boegel
Copy link
Member

boegel commented Apr 3, 2015

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?

@boegel boegel modified the milestone: 2.2.1 Aug 13, 2015
@boegel
Copy link
Member

boegel commented Aug 17, 2015

@serverhorror: ping?

@boegel
Copy link
Member

boegel commented Aug 17, 2015

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

@boegel
Copy link
Member

boegel commented Aug 17, 2015

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.

@boegel
Copy link
Member

boegel commented Aug 17, 2015

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

@boegel
Copy link
Member

boegel commented Aug 17, 2015

I'll see if we can get this fixed in vsc-base, which hosts the option parser used by EasyBuild; see hpcugent/vsc-base#184.

@boegel boegel modified the milestones: 2.2.1, 2.3.0 Aug 27, 2015
@boegel
Copy link
Member

boegel commented Oct 10, 2015

hpcugent/vsc-base#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.

@boegel boegel removed this from the v2.7.0 milestone Apr 1, 2016
@boegel boegel modified the milestones: v2.8.0, v2.9.0 May 17, 2016
@boegel boegel modified the milestones: v2.9.0, 3.0 Sep 23, 2016
@boegel boegel modified the milestones: 3.0, 3.1 Nov 10, 2016
@boegel boegel modified the milestones: 3.1.0, 3.2.0 Feb 10, 2017
@boegel boegel modified the milestones: 3.2.0, 3.3.0 May 15, 2017
@boegel boegel modified the milestones: 3.3.0, 3.x Jun 26, 2017
@boegel boegel modified the milestones: 3.x, 4.x Dec 4, 2019
@serverhorror
Copy link
Author

Cleaning up old issues on my profile

@serverhorror serverhorror closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants