aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-02-01 09:11:05 +1300
committerPaul Eggleton <paul.eggleton@linux.intel.com>2017-02-07 09:43:34 +1300
commitede21e1bb24714c94f2fe7a97749127a03ccd8fb (patch)
tree09ec6d1a6e4d7611d40875aedd35300a754aca64 /scripts
parent5d1f23f2205be024f43facc76f69ad0a9b2bb154 (diff)
downloadopenembedded-core-contrib-ede21e1bb24714c94f2fe7a97749127a03ccd8fb.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.) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/recipetool/create.py3
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):
pn = res.group(1).strip().replace('_', '-')
pv = res.group(2).strip().replace('_', '.')
- if not pn and not pv:
+ if not pn and not pv and parseres.scheme not in ['git', 'gitsm', 'svn', 'hg']:
srcfile = os.path.basename(parseres.path.rstrip('/'))
pn, pv = determine_from_filename(srcfile)
@@ -567,7 +567,6 @@ def create_recipe(args):
if name_pv and not realpv:
realpv = name_pv
-
if not srcuri:
lines_before.append('# No information for SRC_URI yet (only an external source tree was specified)')
lines_before.append('SRC_URI = "%s"' % srcuri)