mirror of
https://git.yoctoproject.org/poky
synced 2026-05-09 05:29:32 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
9c6a125462
commit
4b202e0720
@@ -423,6 +423,7 @@ def create_recipe(args):
|
|||||||
srcsubdir = ''
|
srcsubdir = ''
|
||||||
srcrev = '${AUTOREV}'
|
srcrev = '${AUTOREV}'
|
||||||
srcbranch = ''
|
srcbranch = ''
|
||||||
|
scheme = ''
|
||||||
storeTagName = ''
|
storeTagName = ''
|
||||||
pv_srcpv = False
|
pv_srcpv = False
|
||||||
|
|
||||||
@@ -682,7 +683,14 @@ def create_recipe(args):
|
|||||||
lines_before.append('')
|
lines_before.append('')
|
||||||
lines_before.append('# Modify these as desired')
|
lines_before.append('# Modify these as desired')
|
||||||
# Note: we have code to replace realpv further down if it gets set to some other value
|
# Note: we have code to replace realpv further down if it gets set to some other value
|
||||||
lines_before.append('PV = "%s+git${SRCPV}"' % (realpv or '1.0'))
|
scheme, _, _, _, _, _ = bb.fetch2.decodeurl(srcuri)
|
||||||
|
if scheme in ['git', 'gitsm']:
|
||||||
|
srcpvprefix = 'git'
|
||||||
|
elif scheme == 'svn':
|
||||||
|
srcpvprefix = 'svnr'
|
||||||
|
else:
|
||||||
|
srcpvprefix = scheme
|
||||||
|
lines_before.append('PV = "%s+%s${SRCPV}"' % (realpv or '1.0', srcpvprefix))
|
||||||
pv_srcpv = True
|
pv_srcpv = True
|
||||||
if not args.autorev and srcrev == '${AUTOREV}':
|
if not args.autorev and srcrev == '${AUTOREV}':
|
||||||
if os.path.exists(os.path.join(srctree, '.git')):
|
if os.path.exists(os.path.join(srctree, '.git')):
|
||||||
|
|||||||
Reference in New Issue
Block a user