summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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: