From: "Sourabh Banerjee" <sbanerje@codeaurora.org>
To: bitbake-devel@lists.openembedded.org
Cc: Sourabh Banerjee <sbanerje@codeaurora.org>
Subject: [PATCH 3/3] bitbake: fetch2/repo: add support for --repo-url and --repo-branch
Date: Tue, 18 May 2021 21:05:24 +0530 [thread overview]
Message-ID: <1621352124-27088-3-git-send-email-sbanerje@codeaurora.org> (raw)
In-Reply-To: <1621352124-27088-1-git-send-email-sbanerje@codeaurora.org>
repo tool provides following options to use a stable or preferred
version of the tool
repo Version options:
--repo-url=URL repo repository location
--repo-branch=REVISION
repo branch or revision
By supplying repo_url=<uri> and repo_branch=<branch> recipe may choose
to sync a specific version of repo tool.
Signed-off-by: Sourabh Banerjee <sbanerje@codeaurora.org>
---
bitbake/lib/bb/fetch2/repo.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/bitbake/lib/bb/fetch2/repo.py b/bitbake/lib/bb/fetch2/repo.py
index e7c5255..902337f 100644
--- a/bitbake/lib/bb/fetch2/repo.py
+++ b/bitbake/lib/bb/fetch2/repo.py
@@ -66,9 +66,15 @@ class Repo(FetchMethod):
repodir = os.path.join(codir, "repo")
bb.utils.mkdirhier(repodir)
if not os.path.exists(os.path.join(repodir, ".repo")):
+ repo_url = ud.parm.get('repo_url', '')
+ if repo_url:
+ repo_url = '--repo-url=' + repo_url
+ repo_branch = ud.parm.get('repo_branch', '')
+ if repo_branch:
+ repo_branch = '--repo-branch=' + repo_branch
bb.fetch2.check_network_access(d, "%s init -m %s -b %s -u %s://%s%s%s" % (ud.basecmd, ud.manifest, ud.branch, ud.proto, username, ud.host, ud.path), ud.url)
- runfetchcmd("%s init -m %s -b %s -u %s://%s%s%s" % (ud.basecmd, ud.manifest, ud.branch, ud.proto, username, ud.host, ud.path), d, workdir=repodir)
+ runfetchcmd("%s init -m %s -b %s -u %s://%s%s%s %s %s" % (ud.basecmd, ud.manifest, ud.branch, ud.proto, username, ud.host, ud.path, repo_url, repo_branch), d, workdir=repodir)
# Projects to fetch simultaneously at time of 'repo sync'.
# If SRC_URI provides parallel jobs parameter as follows:
--
2.7.4
prev parent reply other threads:[~2021-05-18 15:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-18 15:35 [PATCH 1/3] bitbake: fetch2/repo: add support for projects to be fetched simultaneously Sourabh Banerjee
2021-05-18 15:35 ` [PATCH 2/3] bitbake: fetch2/repo: add support for sync specific projects Sourabh Banerjee
2021-05-18 15:35 ` Sourabh Banerjee [this message]
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=1621352124-27088-3-git-send-email-sbanerje@codeaurora.org \
--to=sbanerje@codeaurora.org \
--cc=bitbake-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.