]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake/git.py: Allow tracking of branches in SRC_URI without cloning for use with...
authorRichard Purdie <rpurdie@linux.intel.com>
Fri, 13 Aug 2010 10:18:14 +0000 (11:18 +0100)
committerRichard Purdie <rpurdie@linux.intel.com>
Fri, 13 Aug 2010 10:35:11 +0000 (11:35 +0100)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
bitbake/lib/bb/fetch/__init__.py
bitbake/lib/bb/fetch/git.py

index 46957670a5fb9cb53f1c8460fc5471a9372309f7..47a44708be292996a8f4dd327c0eca11ba07ed51 100644 (file)
@@ -521,10 +521,11 @@ class FetchData(object):
                 # Horrible...
                 bb.data.delVar("ISHOULDNEVEREXIST", d)
 
-        # Note: These files should always be in DL_DIR whereas localpath may not be.
-        basepath = bb.data.expand("${DL_DIR}/%s" % os.path.basename(self.localpath), d)
-        self.md5 = basepath + '.md5'
-        self.lockfile = basepath + '.lock'
+        if self.localpath is not None:
+            # Note: These files should always be in DL_DIR whereas localpath may not be.
+            basepath = bb.data.expand("${DL_DIR}/%s" % os.path.basename(self.localpath), d)
+            self.md5 = basepath + '.md5'
+            self.lockfile = basepath + '.lock'
 
 
 class Fetch(object):
index 535f9e5f3a4fc44ceb38a12276ec169e74787ec8..e77d2a5b91a7c3b16e65630611f787c9732f52a1 100644 (file)
@@ -79,6 +79,10 @@ class Git(Fetch):
 
         ud.basecmd = data.getVar("FETCHCMD_git", d, True) or "git"
 
+        if 'noclone' in ud.parm:
+            ud.localfile = None
+            return None
+
         return os.path.join(data.getVar("DL_DIR", d, True), ud.localfile)
 
     def go(self, loc, ud, d):