diff options
author | Stanley Phoong <stanley.cheong.kwan.phoong@intel.com> | 2017-08-07 11:20:37 +0800 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2017-08-21 17:28:31 +1200 |
commit | 029c76797ae1e9aaa7c30553a5d3a74356665f84 (patch) | |
tree | 4b8ee39c57f41211b974dbf62a8bd18b52571da4 | |
parent | b92ec20b20072b75f6b68071b94236fc8f576b78 (diff) | |
download | openembedded-core-contrib-029c76797ae1e9aaa7c30553a5d3a74356665f84.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.
Signed-off-by: Stanley Phoong <stanley.cheong.kwan.phoong@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-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): srcrev = '${AUTOREV}' srcbranch = '' storeTagName = '' + pv_srcpv = False if os.path.isfile(source): source = 'file://%s' % os.path.abspath(source) @@ -671,6 +672,7 @@ def create_recipe(args): lines_before.append('') lines_before.append('# Modify these as desired') lines_before.append('PV = "%s+git${SRCPV}"' % (realpv or '1.0')) + pv_srcpv = True if not args.autorev and srcrev == '${AUTOREV}': if os.path.exists(os.path.join(srctree, '.git')): (stdout, _) = bb.process.run('git rev-parse HEAD', cwd=srctree) @@ -797,7 +799,7 @@ def create_recipe(args): skipblank = True continue elif line.startswith('SRC_URI = '): - if realpv: + if realpv and not pv_srcpv: line = line.replace(realpv, '${PV}') elif line.startswith('PV = '): if realpv: |