diff options
Diffstat (limited to 'scripts/lib/recipetool/create.py')
| -rw-r--r-- | scripts/lib/recipetool/create.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py index e48e418df5..3abdad0fbc 100644 --- a/scripts/lib/recipetool/create.py +++ b/scripts/lib/recipetool/create.py | |||
| @@ -424,6 +424,7 @@ def create_recipe(args): | |||
| 424 | srcrev = '${AUTOREV}' | 424 | srcrev = '${AUTOREV}' |
| 425 | srcbranch = '' | 425 | srcbranch = '' |
| 426 | storeTagName = '' | 426 | storeTagName = '' |
| 427 | pv_srcpv = False | ||
| 427 | 428 | ||
| 428 | if os.path.isfile(source): | 429 | if os.path.isfile(source): |
| 429 | source = 'file://%s' % os.path.abspath(source) | 430 | source = 'file://%s' % os.path.abspath(source) |
| @@ -671,6 +672,7 @@ def create_recipe(args): | |||
| 671 | lines_before.append('') | 672 | lines_before.append('') |
| 672 | lines_before.append('# Modify these as desired') | 673 | lines_before.append('# Modify these as desired') |
| 673 | lines_before.append('PV = "%s+git${SRCPV}"' % (realpv or '1.0')) | 674 | lines_before.append('PV = "%s+git${SRCPV}"' % (realpv or '1.0')) |
| 675 | pv_srcpv = True | ||
| 674 | if not args.autorev and srcrev == '${AUTOREV}': | 676 | if not args.autorev and srcrev == '${AUTOREV}': |
| 675 | if os.path.exists(os.path.join(srctree, '.git')): | 677 | if os.path.exists(os.path.join(srctree, '.git')): |
| 676 | (stdout, _) = bb.process.run('git rev-parse HEAD', cwd=srctree) | 678 | (stdout, _) = bb.process.run('git rev-parse HEAD', cwd=srctree) |
| @@ -797,7 +799,7 @@ def create_recipe(args): | |||
| 797 | skipblank = True | 799 | skipblank = True |
| 798 | continue | 800 | continue |
| 799 | elif line.startswith('SRC_URI = '): | 801 | elif line.startswith('SRC_URI = '): |
| 800 | if realpv: | 802 | if realpv and not pv_srcpv: |
| 801 | line = line.replace(realpv, '${PV}') | 803 | line = line.replace(realpv, '${PV}') |
| 802 | elif line.startswith('PV = '): | 804 | elif line.startswith('PV = '): |
| 803 | if realpv: | 805 | if realpv: |
