On Tue, 2025-02-11 at 16:00 +0100, Stefan Herbrechtsmeier via 
lists.openembedded.org wrote:
> From: Stefan Herbrechtsmeier <stefan.herbrechtsme...@weidmueller.com>
> 
> Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsme...@weidmueller.com>
> ---
> 
>  bitbake/lib/bb/fetch2/__init__.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/bitbake/lib/bb/fetch2/__init__.py 
> b/bitbake/lib/bb/fetch2/__init__.py
> index de36f06bfc..e4c489d059 100644
> --- a/bitbake/lib/bb/fetch2/__init__.py
> +++ b/bitbake/lib/bb/fetch2/__init__.py
> @@ -1533,7 +1533,7 @@ class FetchMethod(object):
>                  tar_cmd += ' --strip-components=%s' %  
> urldata.parm['striplevel']
>              if file.endswith('.tar'):
>                  cmd = '%s -f %s' % (tar_cmd, file)
> -            elif file.endswith('.tgz') or file.endswith('.tar.gz') or 
> file.endswith('.tar.Z'):
> +            elif any(file.endswith(ext) for ext in {'.tgz', '.tar.gz', 
> '.tar.Z', '.crate'}):
>                  cmd = '%s -z -f %s' % (tar_cmd, file)
>              elif file.endswith('.tbz') or file.endswith('.tbz2') or 
> file.endswith('.tar.bz2'):
>                  cmd = 'bzip2 -dc %s | %s -f -' % (file, tar_cmd)

I think you can just do:

file.endswith(('.tgz', '.tar.gz', '.tar.Z', '.crate'))

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#211185): 
https://lists.openembedded.org/g/openembedded-core/message/211185
Mute This Topic: https://lists.openembedded.org/mt/111123518/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to