summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2011-09-17 12:03:47 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-09-20 22:24:10 +0100
commit92015c78639893b193ce9b0cf92f96ea653ed011 (patch)
tree75b221ea9e4f57904e9890fed1c480b423251d75 /bitbake/lib
parent28c3aa8b85dac016d38a83dc17b46e0ac76c1caa (diff)
downloadast2050-yocto-poky-92015c78639893b193ce9b0cf92f96ea653ed011.zip
ast2050-yocto-poky-92015c78639893b193ce9b0cf92f96ea653ed011.tar.gz
fetch2/git: fix subpath destination directory
Make the git fetcher's subpath (path within the git repo to fetch) option set the destsuffix (destination directory) option by default. This reverts the behaviour of subpath to the same as when it was introduced. Based on a patch by Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> (Bitbake rev: 3e7f8afeacf7c8c8de3e87778a3907e33d4a06b3) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/fetch2/git.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 4a4c30d..fb6125c 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -210,10 +210,12 @@ class Git(FetchMethod):
subdir = ud.parm.get("subpath", "")
if subdir != "":
readpathspec = ":%s" % (subdir)
+ def_destsuffix = "%s/" % os.path.basename(subdir)
else:
readpathspec = ""
+ def_destsuffix = "git/"
- destsuffix = ud.parm.get("destsuffix", "git/")
+ destsuffix = ud.parm.get("destsuffix", def_destsuffix)
destdir = os.path.join(destdir, destsuffix)
if os.path.exists(destdir):
bb.utils.prunedir(destdir)
OpenPOWER on IntegriCloud