Am 25.07.2017 um 21:40 schrieb Mark H Weaver:
> That's because "--fallback" was treated as the argument to -u, i.e. the
> regexp specifying which packages to upgrade. The few compiled packages
> were needed to run the profile hooks.
I'm astound about this. Python's argparse library is handling this as
the user expects:
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('-u', '--update', nargs='?', const=42)
parser.add_argument('--fallback', action="store_true")
print(parser.parse_args(['-u', '--fallback']))
print(parser.parse_args(['-u', 'xxx', '--fallback']))
prints
Namespace(fallback=True, update=None)
Namespace(fallback=True, update='xxx')
See https://docs.python.org/3/library/argparse.html#nargs
Isn't there a elaborated scheme/guile argparse library we can you? This
would/shouls/could also solve the issue that in guix we can not shortcut
options.
--
Regards
Hartmut Goebel
| Hartmut Goebel | [email protected] |
| www.crazy-compilers.com | compilers which you thought are impossible |