]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
devtool: add support for multiple git url inside a cargo based recipe
authorFrederic Martinsons <frederic.martinsons@gmail.com>
Fri, 31 Mar 2023 05:45:24 +0000 (07:45 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 1 Apr 2023 10:36:24 +0000 (11:36 +0100)
Without that, the possible git urls that are in SRC_URI of a recipe
are removed from SRC_URI during devtool process and so the
cargo_common_do_patch_paths in cargo_common.bbclass cannot
patch these packages to fetch them locally.

I use a generic type name because I foresee this change will
be useful for recipe that used a package manager (cargo but also
npm) see https://bugzilla.yoctoproject.org/show_bug.cgi?id=11015

Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/externalsrc.bbclass

index 26c5803ee66b67a933c2d4c7a0dd7c9320289d20..b00fdba8e982a784bfa183f4f02c4ece65f0f141 100644 (file)
@@ -68,9 +68,7 @@ python () {
         for url in fetch.urls:
             url_data = fetch.ud[url]
             parm = url_data.parm
-            if (url_data.type == 'file' or
-                    url_data.type == 'npmsw' or url_data.type == 'crate' or
-                    'type' in parm and parm['type'] == 'kmeta'):
+            if url_data.type in ['file', 'npmsw', 'crate'] or parm.get('type') in ['kmeta', 'git-dependency']:
                 local_srcuri.append(url)
 
         d.setVar('SRC_URI', ' '.join(local_srcuri))