From: "Aníbal Limón" <anibal.limon@linux.intel.com>
To: Christopher Larson <kergoth@gmail.com>
Cc: yocto <yocto@yoctoproject.org>,
Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] yocto-compat-layer.py: Add script to YP Compatible Layer validation
Date: Mon, 20 Feb 2017 11:32:23 -0600 [thread overview]
Message-ID: <58AB2827.5060400@linux.intel.com> (raw)
In-Reply-To: <CABcZANmXhMdui8xP67uE7LzVibJa+kmWC5CaC7zNA6wV84EVbg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1597 bytes --]
On 02/17/2017 04:41 PM, Christopher Larson wrote:
> On Fri, Feb 17, 2017 at 3:39 PM, Christopher Larson <kergoth@gmail.com>
> wrote:
>
>> On Fri, Feb 17, 2017 at 2:26 PM, Aníbal Limón <
>> anibal.limon@linux.intel.com> wrote:
>>
>>> + parser.add_argument('-l', '--layer', metavar='LAYER_DIR',
>>> + help='Layer to test compatibility with Yocto Project',
>>> + action='store', required=True)
>>>
>>
>> The behavior of this argument is quite unintuitive. First, this path isn’t
>> actually used as the layer directory, detect_layers searches down from that
>> path to *find* layers in that subdirectory, so the argument isn’t what it
>> says it is. Second, why are you making an option mandatory rather than just
>> using arguments?
>>
>> That is, why `layer-compat-layer.py -l layerpath` rather than
>> `layer-compat-layer.py layerpath`. If you change the call to
>> `parser.add_argument(‘layer’, …)` it’d change to the latter behavior.
>>
>
> Worth noting that you could, and probably should, also use nargs=‘+’ to let
> the user specify multiple layers to check, rather than a single path, if
> you go the latter route, and if not, you could change it to an append style
> (for the ‘action’) argument to accomplish the same.
Yes, it's better to change the -l option to use a positional argument
with nargs +.
The detect_layers functionality is used because i want to cover cases
when the user clones a repository that comes with multiple layers like
meta-openembedded.
Best regards,
alimon
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2017-02-20 17:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-17 21:26 [PATCH] yocto-compat-layer.py: Add script to YP Compatible Layer validation Aníbal Limón
2017-02-17 22:39 ` Christopher Larson
2017-02-17 22:41 ` Christopher Larson
2017-02-20 17:32 ` Aníbal Limón [this message]
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=58AB2827.5060400@linux.intel.com \
--to=anibal.limon@linux.intel.com \
--cc=kergoth@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=yocto@yoctoproject.org \
/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