diff options
| -rw-r--r-- | scripts/lib/recipetool/create.py | 10 |
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')): |
