Add support for --disable-robot#4781
Merged
boegel merged 3 commits intoeasybuilders:developfrom Dec 7, 2025
Merged
Conversation
919939e to
a46d9c9
Compare
boegel
reviewed
Apr 9, 2025
| # see http://stackoverflow.com/questions/1229146/parsing-empty-options-in-python | ||
| # ugly code, optparse is crap | ||
| if parser.rargs and not parser.rargs[0].startswith('-'): | ||
| if option.store_or == self.STORE_OR_FALSE and opt_str.startswith("--%s-" % self.DISABLE): |
Member
There was a problem hiding this comment.
2nd part of this condition feels very hard-codey...
Is that also how we can for disabling of regular boolean options?
Contributor
Author
There was a problem hiding this comment.
Yes, that is basically copied verbatim from
easybuild-framework/easybuild/base/generaloption.py
Lines 294 to 297 in a42e25b
We set the `store_or` attribute a few lines above and verify it already.
It might be necessary to disable dependency resolution from the commandline. E.g. when it is enabled in the configfile and we want to upload a single file via `--new-pr`. Add new cmdline action `store_or_False` to generically add support for `--disable-<name>` for such cases.
There is no error raised for dry-run anymore so check the output. This is due to a change in easybuilders#4704 that disables resolving dependencies for --dry-run without --robot
ab78958 to
3a29ef3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It might be necessary to disable dependency resolution from the commandline.
E.g. when it is enabled in the configfile and we want to upload a single
file via
--new-pr.Add new cmdline action
store_or_Falseto generically add support for--disable-<name>for such cases.Closes #4780