]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
cargo_common.bbclass: add support of user in url for patch
authorFrederic Martinsons <frederic.martinsons@gmail.com>
Fri, 31 Mar 2023 05:45:23 +0000 (07:45 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 1 Apr 2023 10:36:24 +0000 (11:36 +0100)
To handle url like git://git@repo/project

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

index 63b13829084b07f51be1534359ae638d40beea55..82ab25b59c59de77cff06e753cbbcbe5c9713912 100644 (file)
@@ -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)