]> code.ossystems Code Review - openembedded-core.git/commitdiff
recipetool: replace version in S value
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Wed, 28 Jan 2015 12:02:26 +0000 (12:02 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 3 Feb 2015 14:53:39 +0000 (14:53 +0000)
If a versioned recipe filename is specified, replace the version in the
value of S with ${PV} just as we do with SRC_URI to make future upgrades
of the recipe easier.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/recipetool/create.py

index 6dba07819bf1b3168cc88becf22c55e4664ddfda..38f5eadaf5bb3dd3b4ee061fdd8ab014ddc3cc81 100644 (file)
@@ -212,6 +212,8 @@ def create_recipe(args):
             # This would be the default, so we don't need to set S in the recipe
             srcsubdir = ''
     if srcsubdir:
+        if pv and pv not in 'git svn hg'.split():
+            srcsubdir = srcsubdir.replace(pv, '${PV}')
         lines_before.append('S = "${WORKDIR}/%s"' % srcsubdir)
         lines_before.append('')