From 92015c78639893b193ce9b0cf92f96ea653ed011 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Sat, 17 Sep 2011 12:03:47 +0100 Subject: 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 (Bitbake rev: 3e7f8afeacf7c8c8de3e87778a3907e33d4a06b3) Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/git.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bitbake') 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): 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) -- cgit v1.2.3-54-g00ecf