openembedded-core.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Weihmann <kweihmann@outlook.com>
To: Stefan Herbrechtsmeier
	<stefan.herbrechtsmeier-oss@weidmueller.com>,
	openembedded-core@lists.openembedded.org
Cc: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Subject: Re: [OE-core] [PATCH 03/12] recipetool: Skip common source files in guess_license
Date: Fri, 8 Oct 2021 09:45:54 +0200	[thread overview]
Message-ID: <AM9PR09MB4642A1F4033A48A1FF7EC20CA8B29@AM9PR09MB4642.eurprd09.prod.outlook.com> (raw)
In-Reply-To: <20211008074228.8635-3-stefan.herbrechtsmeier-oss@weidmueller.com>



On 08.10.21 09:42, Stefan Herbrechtsmeier wrote:
> From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
> 
> Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
> ---
> 
> (no changes since v1)
> 
>   scripts/lib/recipetool/create.py | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
> index e88a4253da..83cf25d9b7 100644
> --- a/scripts/lib/recipetool/create.py
> +++ b/scripts/lib/recipetool/create.py
> @@ -1114,6 +1114,8 @@ def guess_license(srctree, d):
>       licfiles = []
>       for root, dirs, files in os.walk(srctree):
>           for fn in files:
> +            if fn.endswith(".html") or fn.endswith(".js") or fn.endswith(".json") or fn.endswith(".svg") or fn.endswith(".ts"):

Why not

_, _ext = os.path.splitext(fn)
if _ext in [".html", ".js", ".json", ".svg", ".ts"]:

?

to me that would be easier to read and maintain than this ever growing 
or clause construction

> +                continue
>               for spec in licspecs:
>                   if fnmatch.fnmatch(fn, spec):
>                       fullpath = os.path.join(root, fn)
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#156745): https://lists.openembedded.org/g/openembedded-core/message/156745
> Mute This Topic: https://lists.openembedded.org/mt/86165223/3647476
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [kweihmann@outlook.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 


  reply	other threads:[~2021-10-08  7:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-08  7:42 [PATCH 01/12] npm: Add support for EXTRA_OENPM arguments Stefan Herbrechtsmeier
2021-10-08  7:42 ` [PATCH 02/12] recipetool: Move license md5sums into CSV files Stefan Herbrechtsmeier
2021-10-08  7:42 ` [PATCH 03/12] recipetool: Skip common source files in guess_license Stefan Herbrechtsmeier
2021-10-08  7:45   ` Konrad Weihmann [this message]
2021-10-08  7:55     ` [OE-core] " Stefan Herbrechtsmeier
2021-10-08 12:26     ` Richard Purdie
2021-10-12 12:27       ` Stefan Herbrechtsmeier
2021-10-08  7:42 ` [PATCH 04/12] recipetool: Change default paramter fallback_licenses of function split_pkg_licenses from None to [] Stefan Herbrechtsmeier
2022-04-13 21:35   ` [OE-core] " Paul Eggleton
2021-10-08  7:42 ` [PATCH 05/12] recipetool: ignore empty license files Stefan Herbrechtsmeier
2021-10-08  7:42 ` [PATCH 06/12] recipetool: Add logger info for missing license entries Stefan Herbrechtsmeier
2021-10-08  7:42 ` [PATCH 07/12] recipetool: Add support for linenumbers to licenses.csv Stefan Herbrechtsmeier
2021-10-08  7:42 ` [PATCH 08/12] recipetool: npm: Do not add package.json files to LIC_FILES_CHKSUM Stefan Herbrechtsmeier
2021-10-08  7:42 ` [PATCH 09/12] recipetool: npm: Use README as license fallback Stefan Herbrechtsmeier
2021-10-08  7:42 ` [PATCH 10/12] npm: Add variable NPM_NODEDIR with default value Stefan Herbrechtsmeier
2021-10-08  7:42 ` [PATCH 11/12] npm: Use configs for npm environment and args for npm run command Stefan Herbrechtsmeier
2021-10-08  7:42 ` [PATCH 12/12] recipetool: Rework crunch_license to recognize more variants Stefan Herbrechtsmeier

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=AM9PR09MB4642A1F4033A48A1FF7EC20CA8B29@AM9PR09MB4642.eurprd09.prod.outlook.com \
    --to=kweihmann@outlook.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=stefan.herbrechtsmeier-oss@weidmueller.com \
    --cc=stefan.herbrechtsmeier@weidmueller.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;
as well as URLs for NNTP newsgroup(s).