summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Martinsons <frederic.martinsons@gmail.com>2023-03-31 07:45:23 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-04-01 11:36:26 +0100
commitddf65370a905987caf94faaf2085083c966160d8 (patch)
tree22d827eda0414a016f009b5ed5043f9e2358b691
parent0d099fa404b037d46baf63c9a89a8b83c5bf607f (diff)
downloadpoky-ddf65370a905987caf94faaf2085083c966160d8.tar.gz
cargo_common.bbclass: add support of user in url for patch
To handle url like git://git@repo/project (From OE-Core rev: ad99ede096aff03c974b8725d90d3c9d1056bae0) Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes-recipe/cargo_common.bbclass5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes-recipe/cargo_common.bbclass b/meta/classes-recipe/cargo_common.bbclass
index 63b1382908..82ab25b59c 100644
--- a/meta/classes-recipe/cargo_common.bbclass
+++ b/meta/classes-recipe/cargo_common.bbclass
@@ -134,7 +134,10 @@ python cargo_common_do_patch_paths() {
134 name = ud.parm.get('name') 134 name = ud.parm.get('name')
135 destsuffix = ud.parm.get('destsuffix') 135 destsuffix = ud.parm.get('destsuffix')
136 if name is not None and destsuffix is not None: 136 if name is not None and destsuffix is not None:
137 repo = '%s://%s%s' % (ud.proto, ud.host, ud.path) 137 if ud.user:
138 repo = '%s://%s@%s%s' % (ud.proto, ud.user, ud.host, ud.path)
139 else:
140 repo = '%s://%s%s' % (ud.proto, ud.host, ud.path)
138 path = '%s = { path = "%s" }' % (name, os.path.join(workdir, destsuffix)) 141 path = '%s = { path = "%s" }' % (name, os.path.join(workdir, destsuffix))
139 patches.setdefault(repo, []).append(path) 142 patches.setdefault(repo, []).append(path)
140 143