From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
To: Phil Blundell <philb@gnu.org>, Chris Larson <clarson@kergoth.com>,
Martin Jansa <martin.jansa@gmail.com>
Cc: openembedded-devel@lists.openembedded.org
Subject: Re: [PATCH] git: add SRC_URI name
Date: Fri, 5 Mar 2010 21:53:57 +0100 [thread overview]
Message-ID: <20100305205357.GE7868@mx.loc> (raw)
In-Reply-To: <20100224171832.GA20737@mx.loc>
On Wed, Feb 24, 2010 at 06:18:32PM +0100, Bernhard Reutner-Fischer wrote:
>On Mon, Feb 22, 2010 at 11:45:43PM +0100, Bernhard Reutner-Fischer wrote:
>>On Mon, Feb 22, 2010 at 05:06:21PM -0500, Denys Dmytriyenko wrote:
>>
>>>> Not using "archive" as Martin likes as default, but uri%d, but
>>>
>>>For multiple SRC_URIs, using uri1/uri2 can be more confusing and may be not
>>>much better than looking up real names in .inc file...
>>
>>ok, so let's drop that superfluous .note and the url%d handling.
>>Other opinions?
>
>I'm using this now, fwiw.
ping?
>
>cheers,
>diff --git a/classes/base.bbclass b/classes/base.bbclass
>index c8ee722..0b0a2d8 100644
>--- a/classes/base.bbclass
>+++ b/classes/base.bbclass
>@@ -61,10 +61,14 @@ def base_chk_file_vars(parser, localpath, params, data):
> name = params["name"]
> except KeyError:
> return False
>- flagName = "%s.md5sum" % name
>- want_md5sum = bb.data.getVarFlag("SRC_URI", flagName, data)
>- flagName = "%s.sha256sum" % name
>- want_sha256sum = bb.data.getVarFlag("SRC_URI", flagName, data)
>+ if name:
>+ md5flag = "%s.md5sum" % name
>+ sha256flag = "%s.sha256sum" % name
>+ else:
>+ md5flag = "md5sum"
>+ sha256flag = "sha256sum"
>+ want_md5sum = bb.data.getVarFlag("SRC_URI", md5flag, data)
>+ want_sha256sum = bb.data.getVarFlag("SRC_URI", sha256flag, data)
>
> if (want_sha256sum == None and want_md5sum == None):
> # no checksums to check, nothing to do
>@@ -702,12 +706,18 @@ python base_do_fetch() {
> pn = bb.data.getVar('PN', d, True)
>
> # Check each URI
>+ first_uri = True
> for url in src_uri.split():
> localpath = bb.data.expand(bb.fetch.localpath(url, localdata), localdata)
> (type,host,path,_,_,params) = bb.decodeurl(url)
> uri = "%s://%s%s" % (type,host,path)
> try:
> if type in [ "http", "https", "ftp", "ftps" ]:
>+ # We provide a default shortcut of plain [] for the first fetch uri
>+ # Explicit names in any uri overrides this default.
>+ if not "name" in params and first_uri:
>+ first_uri = False
>+ params["name"] = ""
> if not (base_chk_file_vars(parser, localpath, params, d) or base_chk_file(parser, pn, pv,uri, localpath, d)):
> if not bb.data.getVar("OE_ALLOW_INSECURE_DOWNLOADS", d, True):
> bb.fatal("%s-%s: %s has no checksum defined, cannot check archive integrity" % (pn,pv,uri))
>diff --git a/docs/usermanual/reference/var_src_uri.xml b/docs/usermanual/reference/var_src_uri.xml
>index a35e1ee..7b51b56 100644
>--- a/docs/usermanual/reference/var_src_uri.xml
>+++ b/docs/usermanual/reference/var_src_uri.xml
>@@ -29,7 +29,12 @@
> be used in preference to retrieving a new version . Any source that is
> retrieved from a remote URI will be stored in the download source directory
> and an appropriate md5 sum generated and stored alongside it.</para>
>-
>+ <para>Checksums for http/https/ftp/ftps uris are stored in each recipe in
>+ the form of<screen>SRC_URI[md5sum] = "9a7a11ffd52d9c4553ea8c0134a6fa86"
>+SRC_URI[sha256sum] = "36bdb85c97b39ac604bc58cb7857ee08295242c78a12848ef8a31701921b9434"</screen>
>+ for the first remote SRC_URI that has <emphasis>no</emphasis> explicit <command>name=foo</command>
>+ associated with it. Following <emphasis>unnamed</emphasis> SRC_URIs without
>+ a checksum will throw errors.</para>
> <para>Each URI supports a set of additional options. These options are
> tag/value pairs of the form <command>"a=b"</command> and are semi-colon
> separated from each other and from the URI. The follow examples shows two
next prev parent reply other threads:[~2010-03-05 20:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-21 15:32 [PATCH] git: add SRC_URI name Bernhard Reutner-Fischer
2010-02-22 16:24 ` Denys Dmytriyenko
2010-02-22 16:55 ` Phil Blundell
2010-02-22 17:06 ` Chris Larson
2010-02-22 18:17 ` Martin Jansa
2010-02-22 19:41 ` Bernhard Reutner-Fischer
2010-02-22 21:43 ` Bernhard Reutner-Fischer
2010-02-22 22:06 ` Denys Dmytriyenko
2010-02-22 22:45 ` Bernhard Reutner-Fischer
2010-02-24 17:18 ` Bernhard Reutner-Fischer
2010-03-05 20:53 ` Bernhard Reutner-Fischer [this message]
2010-03-22 11:07 ` Roman Khimov
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=20100305205357.GE7868@mx.loc \
--to=rep.dot.nop@gmail.com \
--cc=clarson@kergoth.com \
--cc=martin.jansa@gmail.com \
--cc=openembedded-devel@lists.openembedded.org \
--cc=philb@gnu.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.