aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-05-27 13:50:23 +1200
committerPaul Eggleton <paul.eggleton@linux.intel.com>2016-05-30 10:18:24 +1200
commitbc34623687dfbf932402c899e044d867113b7138 (patch)
tree0e7087265d2427ebfd26bfa1c473c2ed3873af6f
parent3b33b810a8f9f2b0061341215848482ebff29ee9 (diff)
downloadopenembedded-core-contrib-bc34623687dfbf932402c899e044d867113b7138.tar.gz
openembedded-core-contrib-bc34623687dfbf932402c899e044d867113b7138.tar.bz2
openembedded-core-contrib-bc34623687dfbf932402c899e044d867113b7138.zip
recipetool: create: use ${BP} for subdir for binary packages
If we use ${BP} for the subdirectory, the default value of S will work rather than having to have an ugly value derived from the package file name in both places. This does mean that we have to assume the default though (we can't just let the normal logic work because the value of BP is the default until later on, so the replacement doesn't work). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-rw-r--r--scripts/lib/recipetool/create.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index ad2618963d1..1899a0dcd83 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -359,7 +359,7 @@ def create_recipe(args):
if args.binary:
# Assume the archive contains the directory structure verbatim
# so we need to extract to a subdirectory
- fetchuri += ';subdir=%s' % os.path.splitext(os.path.basename(urlparse.urlsplit(fetchuri).path))[0]
+ fetchuri += ';subdir=${BP}'
srcuri = fetchuri
rev_re = re.compile(';rev=([^;]+)')
res = rev_re.search(srcuri)
@@ -566,7 +566,9 @@ def create_recipe(args):
lines_before.append('SRCREV = "%s"' % srcrev)
lines_before.append('')
- if srcsubdir:
+ if srcsubdir and not args.binary:
+ # (for binary packages we explicitly specify subdir= when fetching to
+ # match the default value of S, so we don't need to set it in that case)
lines_before.append('S = "${WORKDIR}/%s"' % srcsubdir)
lines_before.append('')