set command suggests incorrect command-line options order
Opened this issue · 2 comments
I couldn't get 1.8.2-1 to work at all, so I checkout the current version of apt-offline for github, but I'm also having issues with it. This first one isn't a big deal, but probably should be fixed.
When running apt-offline set
with no additional arguments, the following message is printed:
$ apt-offline set
usage: apt-offline set [-h] [--verbose] [--quiet] [--simulate]
[--install-packages [PKG [PKG ...]]]
[--install-src-packages [SOURCE PKG [SOURCE PKG ...]]]
[--src-build-dep] [--release release_name] [--update]
[--upgrade] [--upgrade-type upgrade]
[--generate-changelog] [--apt-backend apt-get]
apt-offline.sig
apt-offline set: error: the following arguments are required: apt-offline.sig
This arrangement suggests that installing a single package (for instance) would be achieved with the following command:
$ apt-offline set --install-packages bsdgames apt-offline.sig
But as far as I can tell, the proper order is:
$ apt-offline set apt-offline.sig --install-packages bsdgames
I agree on this confusing output. But that order comes from the option parser module provided in Python.
To cut out on the confusion, we documented it with better examples in the manpages.
EXAMPLES
NOTE: argument/option handling
apt-offline relies on argparse for argument/option parsing. To explicitly instruct apt-offline about an argument, you can pass it with the -- delimiter.
Ex. apt-offline set --update --upgrade --install-packages wm2 -- foo.sig
By specifying the -- delimiter, we instruct apt-offline that foo.sig is an argument to the apt-offline command and not to the --install-packages option.
Otherwise, you could also use it positionally next to the set command
Ex. apt-offline set foo.sig --update --upgrade --install-packages wm2
There's not much for apt-offline
to do here than documenting about it, which has already been done in the manual pages.
Based on the comment above, I'm closing this bug report.