diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-09-19 08:08:11 +1200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-09-20 15:11:07 +0100 |
commit | 90f925cd41a372c839289b25f1f55490c77f4dd7 (patch) | |
tree | e2b613f51eb508af0714d101e1a5c261d8018d50 /scripts/lib/scriptutils.py | |
parent | 147774fc1ca9d1fd1afd5e2f255dccbfe464dabd (diff) | |
download | poky-90f925cd41a372c839289b25f1f55490c77f4dd7.tar.gz |
recipetool: create: support git short form URLs
In keeping with making recipetool create / devtool add as easy to use as
possible, users shouldn't have to know how to reformat git short form ssh
URLs for consumption by BitBake's fetcher (for example
user@git.example.com:repo.git should be expressed as
git://user@git.example.com/repo.git;protocol=ssh ) - instead we should
just take care of that automatically. Add some logic in the appropriate
places to do that.
(From OE-Core rev: 78c672a72f49c4b6cfd8c247efcc676b0ba1681a)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/scriptutils.py')
-rw-r--r-- | scripts/lib/scriptutils.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/lib/scriptutils.py b/scripts/lib/scriptutils.py index bd082d8581..5ccc027968 100644 --- a/scripts/lib/scriptutils.py +++ b/scripts/lib/scriptutils.py | |||
@@ -116,3 +116,16 @@ def run_editor(fn): | |||
116 | except OSError as exc: | 116 | except OSError as exc: |
117 | logger.error("Execution of editor '%s' failed: %s", editor, exc) | 117 | logger.error("Execution of editor '%s' failed: %s", editor, exc) |
118 | return 1 | 118 | return 1 |
119 | |||
120 | def is_src_url(param): | ||
121 | """ | ||
122 | Check if a parameter is a URL and return True if so | ||
123 | NOTE: be careful about changing this as it will influence how devtool/recipetool command line handling works | ||
124 | """ | ||
125 | if not param: | ||
126 | return False | ||
127 | elif '://' in param: | ||
128 | return True | ||
129 | elif param.startswith('git@') or ('@' in param and param.endswith('.git')): | ||
130 | return True | ||
131 | return False | ||