summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Darander <anders@chargestorm.se>2015-04-17 07:49:42 +0200
committerPaul Eggleton <paul.eggleton@linux.intel.com>2015-04-22 13:38:04 +0100
commit7110055ab26d40e2a4e83956177b59a58e9cdcfd (patch)
tree2a2345fbf9f5608fe4659ff0476b4f343cf732cb
parent4460e6de04844c4060f1fe87c8a4b247b731c63e (diff)
downloadbitbake-7110055ab26d40e2a4e83956177b59a58e9cdcfd.tar.gz
fetch/git: Remove a possible trailing '/' in subpath
If the subpath parameter to the git fetcher ends with a trailing '/', bb.utils.prunedir() will be called on '/'... Fixes [YOCTO #7620]. (Bitbake master rev: 380a3fb372c8b0a53dd7528562e6e7a222dc76ef) Signed-off-by: Anders Darander <anders@chargestorm.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/fetch2/git.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index 44fc27193..0fd9beee1 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -246,7 +246,7 @@ class Git(FetchMethod):
subdir = ud.parm.get("subpath", "")
if subdir != "":
readpathspec = ":%s" % (subdir)
- def_destsuffix = "%s/" % os.path.basename(subdir)
+ def_destsuffix = "%s/" % os.path.basename(subdir.rstrip('/'))
else:
readpathspec = ""
def_destsuffix = "git/"