summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-08-31 11:54:13 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-31 23:30:02 +0100
commit4b202e07201655c65d65842829ddfb33e1edc5e4 (patch)
tree758eada9b0a73407f88665d5699b653a9e9d6e7e /scripts
parent9c6a125462dcdff1ffd7c937c99efa38d57ef32c (diff)
downloadpoky-4b202e07201655c65d65842829ddfb33e1edc5e4.tar.gz
recipetool: create: fix SRCPV prefix for non-git SCMs
If you're fetching from an SCM other than git (for example subversion or mercurial) then we need to use a different prefix for the SRCPV in PV instead of +git. (From OE-Core rev: ad1200c8729f21b325d347649f9dd5e5598de93e) 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.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index 4da745b732..d8cfcbdab8 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -423,6 +423,7 @@ def create_recipe(args):
423 srcsubdir = '' 423 srcsubdir = ''
424 srcrev = '${AUTOREV}' 424 srcrev = '${AUTOREV}'
425 srcbranch = '' 425 srcbranch = ''
426 scheme = ''
426 storeTagName = '' 427 storeTagName = ''
427 pv_srcpv = False 428 pv_srcpv = False
428 429
@@ -682,7 +683,14 @@ def create_recipe(args):
682 lines_before.append('') 683 lines_before.append('')
683 lines_before.append('# Modify these as desired') 684 lines_before.append('# Modify these as desired')
684 # Note: we have code to replace realpv further down if it gets set to some other value 685 # Note: we have code to replace realpv further down if it gets set to some other value
685 lines_before.append('PV = "%s+git${SRCPV}"' % (realpv or '1.0')) 686 scheme, _, _, _, _, _ = bb.fetch2.decodeurl(srcuri)
687 if scheme in ['git', 'gitsm']:
688 srcpvprefix = 'git'
689 elif scheme == 'svn':
690 srcpvprefix = 'svnr'
691 else:
692 srcpvprefix = scheme
693 lines_before.append('PV = "%s+%s${SRCPV}"' % (realpv or '1.0', srcpvprefix))
686 pv_srcpv = True 694 pv_srcpv = True
687 if not args.autorev and srcrev == '${AUTOREV}': 695 if not args.autorev and srcrev == '${AUTOREV}':
688 if os.path.exists(os.path.join(srctree, '.git')): 696 if os.path.exists(os.path.join(srctree, '.git')):