Skip to contentSkip to conversation

Fix git fetcher subpath option

PATCH In review Paul Eggleton 1 participant 3 messages Sep 16, 2011 – Sep 17, 2011

lore
Share & tools
lore
#0 lore raw

cover Fix git fetcher subpath option

This patch makes the git fetcher (fetch2) subpath option work the way the Opie git recipes (the main user of the option) expect.

The patch (against poky, but applies cleanly to bitbake master with
-p2) is available at:

git://git.pokylinux.org/poky-contrib paule/subpath
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=paule/subpath

Paul Eggleton (1):
fetch2/git: fix subpath destination directory

 bitbake/lib/bb/fetch2/git.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 1/1 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 <[email protected]>

---
 bitbake/lib/bb/fetch2/git.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
bitbake/lib/bb/fetch2/git.py +3 -1
index 9a578ae..5e9e817 100644
@@ -210,10 +210,12 @@ class Git(FetchMethod):
         subdir = ud.parm.get("subpath", "")
         if subdir != "":
             readpathspec = ":%s" % (subdir)
+            def_destsuffix = "%s/" % 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)
Signature · 1 line
1.7.4.1
#2 lore raw

Re: [PATCH 1/1] fetch2/git: fix subpath destination directory

Hmm, this patch is broken for subpath depth > 1. Please disregard; will send a v2 soon.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre