[bitbake-devel] [PATCH V3 2/2] bitbake-layers: add a ability to query layer dependencies from layer index
Bernhard Reutner-Fischer
rep.dot.nop at gmail.com
Fri Jan 23 13:30:52 UTC 2015
On 23 January 2015 at 06:28, Chong Lu <Chong.Lu at windriver.com> wrote:
> Add a command to query layer dependencies from layer index. Fetch layer and its
> dependency layers and add them into conf/bblayers.conf.
>
> [YOCTO #5348]
>
> Signed-off-by: Chong Lu <Chong.Lu at windriver.com>
> ---
> bitbake/bin/bitbake-layers | 190 +++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 190 insertions(+)
>
> diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers
> index 9879498..222f685 100755
> --- a/bitbake/bin/bitbake-layers
> +++ b/bitbake/bin/bitbake-layers
> @@ -27,6 +27,8 @@ import sys
> import fnmatch
> from collections import defaultdict
> import re
> +import httplib, urlparse, json
> +import subprocess
>
> bindir = os.path.dirname(__file__)
> topdir = os.path.dirname(bindir)
> @@ -157,6 +159,194 @@ usage: remove-layer <layerdir>
> sys.stderr.write("No layers matching %s found in BBLAYERS\n" % item)
>
>
> + def get_json_data(self, apiurl):
> + proxy_settings = os.environ.get("http_proxy", None)
> + conn = None
> + _parsedurl = urlparse.urlparse(apiurl)
> + path = _parsedurl.path
> + query = _parsedurl.query
> + def parse_url(url):
> + parsedurl = urlparse.urlparse(url)
> + if parsedurl.netloc[0] == '[':
> + host, port = parsedurl.netloc[1:].split(']', 1)
> + if ':' in port:
> + port = port.rsplit(':', 1)[1]
> + else:
> + port = None
> + else:
> + if parsedurl.netloc.count(':') == 1:
> + (host, port) = parsedurl.netloc.split(":")
> + else:
> + host = parsedurl.netloc
> + port = None
> + return (host, 80 if port is None else int(port))
well yea, except that does not help code-reuse to fix the
wrong splitport patterns used elsewhere in bitbake, unfortunately..
More information about the bitbake-devel
mailing list