From: Frederic Martinsons Date: Fri, 31 Mar 2023 05:45:23 +0000 (+0200) Subject: cargo_common.bbclass: add support of user in url for patch X-Git-Tag: 2023-04-mickledore~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad99ede096aff03c974b8725d90d3c9d1056bae0;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git cargo_common.bbclass: add support of user in url for patch To handle url like git://git@repo/project Signed-off-by: Frederic Martinsons Signed-off-by: Richard Purdie --- diff --git a/meta/classes-recipe/cargo_common.bbclass b/meta/classes-recipe/cargo_common.bbclass index 63b13829084..82ab25b59c5 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() { name = ud.parm.get('name') destsuffix = ud.parm.get('destsuffix') if name is not None and destsuffix is not None: - repo = '%s://%s%s' % (ud.proto, ud.host, ud.path) + if ud.user: + repo = '%s://%s@%s%s' % (ud.proto, ud.user, ud.host, ud.path) + else: + repo = '%s://%s%s' % (ud.proto, ud.host, ud.path) path = '%s = { path = "%s" }' % (name, os.path.join(workdir, destsuffix)) patches.setdefault(repo, []).append(path)