Skip to contentSkip to conversation

bitbake/fetch2/git: Set a default for the GITDIR variable

PATCH Richard Purdie 1 participant 1 message May 11, 2012

lore
Share & tools
lore
#0 lore raw

---

bitbake/lib/bb/fetch2/git.py +3 -2
index 5efdfa9..962cc0a 100644
@@ -136,8 +136,9 @@ class Git(FetchMethod):
             for name in ud.names:
                 gitsrcname = gitsrcname + '_' + ud.revisions[name]
         ud.mirrortarball = 'git2_%s.tar.gz' % (gitsrcname)
-        ud.fullmirror = os.path.join(data.getVar("DL_DIR", d, True), ud.mirrortarball)
-        ud.clonedir = os.path.join(data.expand('${GITDIR}', d), gitsrcname)
+        ud.fullmirror = os.path.join(d.getVar("DL_DIR", True), ud.mirrortarball)
+        gitdir = d.getVar("GITDIR", True) or (d.getVar("DL_DIR", True) + "/git2/")
+        ud.clonedir = os.path.join(gitdir, gitsrcname)
 
         ud.localfile = ud.clonedir