On Tue, 2025-02-11 at 16:00 +0100, Stefan Herbrechtsmeier via
lists.openembedded.org wrote:
> From: Stefan Herbrechtsmeier <[email protected]>
>
> Signed-off-by: Stefan Herbrechtsmeier <[email protected]>
> ---
>
> 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: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-