diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2011-09-17 12:03:47 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-09-20 22:24:10 +0100 |
commit | 92015c78639893b193ce9b0cf92f96ea653ed011 (patch) | |
tree | 75b221ea9e4f57904e9890fed1c480b423251d75 /bitbake/lib/bb/fetch2 | |
parent | 28c3aa8b85dac016d38a83dc17b46e0ac76c1caa (diff) | |
download | 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/bb/fetch2')
-rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 4a4c30d5e4..fb6125ce3f 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py | |||
@@ -210,10 +210,12 @@ class Git(FetchMethod): | |||
210 | subdir = ud.parm.get("subpath", "") | 210 | subdir = ud.parm.get("subpath", "") |
211 | if subdir != "": | 211 | if subdir != "": |
212 | readpathspec = ":%s" % (subdir) | 212 | readpathspec = ":%s" % (subdir) |
213 | def_destsuffix = "%s/" % os.path.basename(subdir) | ||
213 | else: | 214 | else: |
214 | readpathspec = "" | 215 | readpathspec = "" |
216 | def_destsuffix = "git/" | ||
215 | 217 | ||
216 | destsuffix = ud.parm.get("destsuffix", "git/") | 218 | destsuffix = ud.parm.get("destsuffix", def_destsuffix) |
217 | destdir = os.path.join(destdir, destsuffix) | 219 | destdir = os.path.join(destdir, destsuffix) |
218 | if os.path.exists(destdir): | 220 | if os.path.exists(destdir): |
219 | bb.utils.prunedir(destdir) | 221 | bb.utils.prunedir(destdir) |