summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Dziendzielski <tomasz.dziendzielski@gmail.com>2021-01-21 23:31:53 +0100
committerSteve Sakoman <steve@sakoman.com>2021-01-28 06:13:19 -1000
commitcd9cee29b656e4c8642971cb87154cc4d5fda599 (patch)
treee77b532e6e3e985c1a71e024d7680af3683078b9
parentcbc72203c82e56ebf4a6a685fbeb27679ed9a2e0 (diff)
downloadopenembedded-core-contrib-cd9cee29b656e4c8642971cb87154cc4d5fda599.tar.gz
devtool: Fix file:// fetcher symlink directory structure
Add relative path if file is under directory. [YOCTO #13738] Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 19ddacc1b38f9ebb86a9359963ccc3c707f7125e) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--scripts/lib/devtool/standard.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index f7d8a82117..7b62b7e7b8 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -474,7 +474,11 @@ def symlink_oelocal_files_srctree(rd,srctree):
destpth = os.path.join(srctree, relpth, fn)
if os.path.exists(destpth):
os.unlink(destpth)
- os.symlink('oe-local-files/%s' % fn, destpth)
+ if relpth != '.':
+ back_relpth = os.path.relpath(local_files_dir, root)
+ os.symlink('%s/oe-local-files/%s/%s' % (back_relpth, relpth, fn), destpth)
+ else:
+ os.symlink('oe-local-files/%s' % fn, destpth)
addfiles.append(os.path.join(relpth, fn))
if addfiles:
bb.process.run('git add %s' % ' '.join(addfiles), cwd=srctree)