diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2017-02-07 09:45:42 +1300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-02-07 14:50:09 +0000 |
commit | e0a94f2e1fe1e3f6f169ac4eaee6fe5dbfc7eaa2 (patch) | |
tree | 3daefe9dcc98f3f121a5ed26b896b919e5a54dd6 /scripts | |
parent | 6ac9c605e6f921f272e1a6764c5ad68cca864865 (diff) | |
download | poky-e0a94f2e1fe1e3f6f169ac4eaee6fe5dbfc7eaa2.tar.gz |
recipetool: create: do not treat numbers in SCM URLs as versions
Numbers within SCM (e.g. git) URLs are extremely unlikely to be valid
version numbers - more likely they are just part of the name, thus don't
try to extract them and use them as the version - doing so causes pretty
bad behaviour within devtool:
--------- snip ---------
$ devtool add https://github.com/inhedron/libtr50
NOTE: Fetching git://github.com/inhedron/libtr50;protocol=https...
...
NOTE: Using default source tree path .../build/workspace/sources/libtr
...
RecursionError: maximum recursion depth exceeded while calling a Python object
--------- snip ---------
(This was because ${PV} was being substituted into the URL, but PV's
value was being set to include ${SRCPV}, so there was a circular
reference.)
(From OE-Core rev: 3427508b6ce865654f8bf01a6fc04b83c70315d3)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/recipetool/create.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py index 0801223582..5bd3853794 100644 --- a/scripts/lib/recipetool/create.py +++ b/scripts/lib/recipetool/create.py | |||
@@ -336,7 +336,7 @@ def determine_from_url(srcuri): | |||
336 | pn = res.group(1).strip().replace('_', '-') | 336 | pn = res.group(1).strip().replace('_', '-') |
337 | pv = res.group(2).strip().replace('_', '.') | 337 | pv = res.group(2).strip().replace('_', '.') |
338 | 338 | ||
339 | if not pn and not pv: | 339 | if not pn and not pv and parseres.scheme not in ['git', 'gitsm', 'svn', 'hg']: |
340 | srcfile = os.path.basename(parseres.path.rstrip('/')) | 340 | srcfile = os.path.basename(parseres.path.rstrip('/')) |
341 | pn, pv = determine_from_filename(srcfile) | 341 | pn, pv = determine_from_filename(srcfile) |
342 | 342 | ||
@@ -567,7 +567,6 @@ def create_recipe(args): | |||
567 | if name_pv and not realpv: | 567 | if name_pv and not realpv: |
568 | realpv = name_pv | 568 | realpv = name_pv |
569 | 569 | ||
570 | |||
571 | if not srcuri: | 570 | if not srcuri: |
572 | lines_before.append('# No information for SRC_URI yet (only an external source tree was specified)') | 571 | lines_before.append('# No information for SRC_URI yet (only an external source tree was specified)') |
573 | lines_before.append('SRC_URI = "%s"' % srcuri) | 572 | lines_before.append('SRC_URI = "%s"' % srcuri) |