From: "Richard Purdie" <richard.purdie@linuxfoundation.org>
To: Ross Burton <ross@burtonini.com>,
openembedded-core@lists.openembedded.org
Cc: Alejandro Hernandez <alhe@linux.microsoft.com>
Subject: Re: [OE-core] [PATCH] yocto-check-layer: make argument parsing unambiguous
Date: Mon, 14 Dec 2020 13:30:57 +0000 [thread overview]
Message-ID: <46755a3c09815c2083f65c090406711ac5114e03.camel@linuxfoundation.org> (raw)
In-Reply-To: <20201210162023.3239592-1-ross.burton@arm.com>
On Thu, 2020-12-10 at 16:20 +0000, Ross Burton wrote:
> Currently the argument parser uses nargs=+ for both the layers
> (positional arguments) and machines/dependencies/addition layers
> (optional arguments). This means it's impossible to determine what is
> meant by:
>
> $ yocto-check-layer --machines a b c
>
> Is this machines=(a,b) and layers=(c), or machines=(a) and layers=(b,c)?
> Or even machines=(a,b,c) and layers=(), which results in a parse failure
> as the layers are mandatory?
>
> The workaround is to re-order the arguments to an unambiguous form:
>
> $ yocto-check-layer b c --machines a
>
> However this means the user needs to know the problem and how to work
> around it. Instead, change the parser to require an explicit --layers
> argument:
>
> $ yocto-check-layer --machines a --layers b c
>
> Also improve the other arguments by adding clearer metavars and short
> options.
>
> [ YOCTO #14148 ]
>
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
> scripts/yocto-check-layer | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
https://autobuilder.yoctoproject.org/typhoon/#/builders/39/builds/2825
Do we need to update the way we're calling it on the autobuilder?
Cheers,
Richard
next prev parent reply other threads:[~2020-12-14 13:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-10 16:20 [PATCH] yocto-check-layer: make argument parsing unambiguous Ross Burton
2020-12-14 13:30 ` Richard Purdie [this message]
2020-12-14 17:30 ` [OE-core] " Ross Burton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46755a3c09815c2083f65c090406711ac5114e03.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=alhe@linux.microsoft.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=ross@burtonini.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox