From: Darren Hart <dvhart@linux.intel.com>
To: Darren Hart <dvhart@linux.intel.com>
Cc: Poky <poky@yoctoproject.org>, evadeflow@gmail.com
Subject: Re: [PATCH] yocto-bsp: Fix git url parsing, allowing for local mirrors
Date: Thu, 18 Oct 2012 10:42:37 -0400 [thread overview]
Message-ID: <5080155D.7080908@linux.intel.com> (raw)
In-Reply-To: <d4af8f9ad5defd3922ac5d6744092e1d650b07fe.1350570203.git.dvhart@linux.intel.com>
Forgot to include:
Fixes [YOCTO #3305]
Saul/RP: Can you include the tag or would you prefer I resend?
(sorry, a bit rushed between conference discussions)
--
Darren
On 10/18/2012 10:23 AM, Darren Hart wrote:
> The git URLs used in bitbake recipes are not compatible directly with git. In
> bitbake-speak, all git URLs start with git:// and the protocol is optionally
> specified in the SRC_URI. Local git mirrors are specified like so:
>
> git:///path/to/local/mirror.git;protocol=file
>
> The URL that git requires would be:
>
> file:///path/to/local/mirror.git
>
> Update the yocto-bsp kernel.py to make the necessary adjustment when parsing
> the SRC_URI to extract the git URL.
>
> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
> CC: Tom Zanussi <tom.zanussi@intel.com>
> CC: evadeflow@gmail.com
> ---
> scripts/lib/bsp/kernel.py | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/scripts/lib/bsp/kernel.py b/scripts/lib/bsp/kernel.py
> index d4bdc4c..128fad0 100644
> --- a/scripts/lib/bsp/kernel.py
> +++ b/scripts/lib/bsp/kernel.py
> @@ -631,6 +631,7 @@ def extract_giturl(file):
> Extract the git url of the kernel repo from the kernel recipe's
> SRC_URI.
> """
> + url = None
> f = open(file, "r")
> lines = f.readlines()
> for line in lines:
> @@ -641,10 +642,15 @@ def extract_giturl(file):
> line = line[1:].strip()
> if line.startswith("\""):
> line = line[1:].strip()
> - fields = line.split(";")
> - if fields:
> - return fields[0]
> - return None
> + prot = "git"
> + for s in line.split(";"):
> + if s.startswith("git://"):
> + url = s
> + if s.startswith("protocol="):
> + prot = s.split("=")[1]
> + if url:
> + url = prot + url[3:]
> + return url
>
>
> def find_giturl(context):
>
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Technical Lead - Linux Kernel
prev parent reply other threads:[~2012-10-18 14:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-18 14:23 [PATCH] yocto-bsp: Fix git url parsing, allowing for local mirrors Darren Hart
2012-10-18 14:42 ` Darren Hart [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=5080155D.7080908@linux.intel.com \
--to=dvhart@linux.intel.com \
--cc=evadeflow@gmail.com \
--cc=poky@yoctoproject.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.