From e625a82af2d7cfb04a0a895d2a395c02676f3680 Mon Sep 17 00:00:00 2001 From: Anders Darander Date: Fri, 17 Apr 2015 07:49:42 +0200 Subject: bitbake: 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) (Bitbake rev: fad3ea40ebaf2cdcb981fb38bd755015e50fc9a5) Signed-off-by: Anders Darander Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 9ca24428a1..5d1a358b79 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py @@ -245,7 +245,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/" -- cgit v1.2.3-54-g00ecf