summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2021-03-16 19:38:50 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-03-20 18:54:55 +0000
commit99c49bae5a42e378688a831cc336970a60272759 (patch)
tree7bbd12e8e20838a378b4551286be417696748da5 /meta/classes
parent80a5009f2d3456571e6d0a897ab86d5c1cad9db8 (diff)
downloadpoky-99c49bae5a42e378688a831cc336970a60272759.tar.gz
base: respect downloadfilename when sniffing the SRC_URI for dependencies
(From OE-Core rev: 2881875da12ac8db3db67e4a45e511169e0e2820) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/base.bbclass14
1 files changed, 8 insertions, 6 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index b4160402f0..42fb84c4d5 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -593,6 +593,8 @@ python () {
593 srcuri = d.getVar('SRC_URI') 593 srcuri = d.getVar('SRC_URI')
594 for uri_string in srcuri.split(): 594 for uri_string in srcuri.split():
595 uri = bb.fetch.URI(uri_string) 595 uri = bb.fetch.URI(uri_string)
596 # Also check downloadfilename as the URL path might not be useful for sniffing
597 path = uri.params.get("downloadfilename", uri.path)
596 598
597 # HTTP/FTP use the wget fetcher 599 # HTTP/FTP use the wget fetcher
598 if uri.scheme in ("http", "https", "ftp"): 600 if uri.scheme in ("http", "https", "ftp"):
@@ -626,27 +628,27 @@ python () {
626 d.appendVarFlag('do_fetch', 'depends', ' nodejs-native:do_populate_sysroot') 628 d.appendVarFlag('do_fetch', 'depends', ' nodejs-native:do_populate_sysroot')
627 629
628 # *.lz4 should DEPEND on lz4-native for unpacking 630 # *.lz4 should DEPEND on lz4-native for unpacking
629 if uri.path.endswith('.lz4'): 631 if path.endswith('.lz4'):
630 d.appendVarFlag('do_unpack', 'depends', ' lz4-native:do_populate_sysroot') 632 d.appendVarFlag('do_unpack', 'depends', ' lz4-native:do_populate_sysroot')
631 633
632 # *.lz should DEPEND on lzip-native for unpacking 634 # *.lz should DEPEND on lzip-native for unpacking
633 elif uri.path.endswith('.lz'): 635 elif path.endswith('.lz'):
634 d.appendVarFlag('do_unpack', 'depends', ' lzip-native:do_populate_sysroot') 636 d.appendVarFlag('do_unpack', 'depends', ' lzip-native:do_populate_sysroot')
635 637
636 # *.xz should DEPEND on xz-native for unpacking 638 # *.xz should DEPEND on xz-native for unpacking
637 elif uri.path.endswith('.xz') or uri.path.endswith('.txz'): 639 elif path.endswith('.xz') or path.endswith('.txz'):
638 d.appendVarFlag('do_unpack', 'depends', ' xz-native:do_populate_sysroot') 640 d.appendVarFlag('do_unpack', 'depends', ' xz-native:do_populate_sysroot')
639 641
640 # .zip should DEPEND on unzip-native for unpacking 642 # .zip should DEPEND on unzip-native for unpacking
641 elif uri.path.endswith('.zip') or uri.path.endswith('.jar'): 643 elif path.endswith('.zip') or path.endswith('.jar'):
642 d.appendVarFlag('do_unpack', 'depends', ' unzip-native:do_populate_sysroot') 644 d.appendVarFlag('do_unpack', 'depends', ' unzip-native:do_populate_sysroot')
643 645
644 # Some rpm files may be compressed internally using xz (for example, rpms from Fedora) 646 # Some rpm files may be compressed internally using xz (for example, rpms from Fedora)
645 elif uri.path.endswith('.rpm'): 647 elif path.endswith('.rpm'):
646 d.appendVarFlag('do_unpack', 'depends', ' xz-native:do_populate_sysroot') 648 d.appendVarFlag('do_unpack', 'depends', ' xz-native:do_populate_sysroot')
647 649
648 # *.deb should DEPEND on xz-native for unpacking 650 # *.deb should DEPEND on xz-native for unpacking
649 elif uri.path.endswith('.deb'): 651 elif path.endswith('.deb'):
650 d.appendVarFlag('do_unpack', 'depends', ' xz-native:do_populate_sysroot') 652 d.appendVarFlag('do_unpack', 'depends', ' xz-native:do_populate_sysroot')
651 653
652 if needsrcrev: 654 if needsrcrev: