aboutsummaryrefslogtreecommitdiffstats
path: root/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-19 12:33:38 +0100
commit3e7f8afeacf7c8c8de3e87778a3907e33d4a06b3 (patch)
treed39d4b747883150dc068b20ebb20020ab281c0b5 /lib
parent3a54dcc09a12406ec6cf22b4b1a2cc4fc203822c (diff)
downloadbitbake-3e7f8afeacf7c8c8de3e87778a3907e33d4a06b3.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> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/bb/fetch2/git.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index 4a4c30d5e..fb6125ce3 100644
--- a/lib/bb/fetch2/git.py
+++ b/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)