diff options
author | Stanley Phoong <stanley.cheong.kwan.phoong@intel.com> | 2017-08-21 17:39:43 +1200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-23 08:47:02 +0100 |
commit | 439a6f1d68db56381e6f445e5cb1d5b6756aa1b8 (patch) | |
tree | e85138b44e854dd1e345b44f24bab449e4bf75d7 /scripts | |
parent | fe62cedd4b81ea0537c3cc7c5141c8e492222e7a (diff) | |
download | poky-439a6f1d68db56381e6f445e5cb1d5b6756aa1b8.tar.gz |
recipetool: create: replacing PV in SRCURI
During recipe creation, it seems that the automation for replacing
${PV} at the SRCURI for tag, (e.g mbed-tls-${PV}) is causing some
issue due to PV assuming it's a git source. A fix is implemented in
this patch to resolve this issue.
(From OE-Core rev: 9d3ec76c1b7dd75d904f5ff47297de0fb65b21c2)
Signed-off-by: Stanley Phoong <stanley.cheong.kwan.phoong@intel.com>
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.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: |