public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: frederic.martinsons@gmail.com
To: openembedded-core@lists.openembedded.org
Cc: martin.jansa@gmail.com
Subject: [PATCH V7 2/6] cargo_common.bbclass: add support of user in url for patch
Date: Sat,  1 Apr 2023 11:30:47 +0200	[thread overview]
Message-ID: <7f4f5b6895ea211ba23ea609ad2e8c8e18e6809f.1680340685.git.frederic.martinsons@gmail.com> (raw)
In-Reply-To: <cover.1680340685.git.frederic.martinsons@gmail.com>

From: Frederic Martinsons <frederic.martinsons@gmail.com>

To handle url like git://git@repo/project

Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
---
 meta/classes-recipe/cargo_common.bbclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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() {
             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)
 
-- 
2.34.1



  parent reply	other threads:[~2023-04-01  9:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-01  9:30 [PATCH V7 0/6] Extend cargo based recipe support frederic.martinsons
2023-04-01  9:30 ` [PATCH V7 1/6] cargo_common.bbclass: Support local github repos frederic.martinsons
2023-04-01  9:30 ` frederic.martinsons [this message]
2023-04-01  9:30 ` [PATCH V7 3/6] devtool: add support for multiple git url inside a cargo based recipe frederic.martinsons
2023-04-01  9:30 ` [PATCH V7 4/6] patch: support of git patches when the source uri contained subpath parameter frederic.martinsons
2023-04-01  9:30 ` [PATCH V7 5/6] meta-selftest: provide a recipe for zvariant frederic.martinsons
2023-04-01  9:30 ` [PATCH V7 6/6] cargo-update-recipe-crates: force name overrides frederic.martinsons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7f4f5b6895ea211ba23ea609ad2e8c8e18e6809f.1680340685.git.frederic.martinsons@gmail.com \
    --to=frederic.martinsons@gmail.com \
    --cc=martin.jansa@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox