diff options
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r-- | bitbake/lib/bb/fetch2/gitsm.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/bitbake/lib/bb/fetch2/gitsm.py b/bitbake/lib/bb/fetch2/gitsm.py index 1f03ba7a0d..c622771d21 100644 --- a/bitbake/lib/bb/fetch2/gitsm.py +++ b/bitbake/lib/bb/fetch2/gitsm.py | |||
@@ -117,7 +117,7 @@ class GitSM(Git): | |||
117 | 117 | ||
118 | url += ';protocol=%s' % proto | 118 | url += ';protocol=%s' % proto |
119 | url += ";name=%s" % module | 119 | url += ";name=%s" % module |
120 | url += ";subpath=%s" % paths[module] | 120 | url += ";subpath=%s" % module |
121 | 121 | ||
122 | ld = d.createCopy() | 122 | ld = d.createCopy() |
123 | # Not necessary to set SRC_URI, since we're passing the URI to | 123 | # Not necessary to set SRC_URI, since we're passing the URI to |
@@ -184,7 +184,7 @@ class GitSM(Git): | |||
184 | 184 | ||
185 | try: | 185 | try: |
186 | newfetch = Fetch([url], d, cache=False) | 186 | newfetch = Fetch([url], d, cache=False) |
187 | newfetch.unpack(root=os.path.dirname(os.path.join(repo_conf, 'modules', modpath))) | 187 | newfetch.unpack(root=os.path.dirname(os.path.join(repo_conf, 'modules', module))) |
188 | except Exception as e: | 188 | except Exception as e: |
189 | logger.error('gitsm: submodule unpack failed: %s %s' % (type(e).__name__, str(e))) | 189 | logger.error('gitsm: submodule unpack failed: %s %s' % (type(e).__name__, str(e))) |
190 | raise | 190 | raise |
@@ -199,9 +199,9 @@ class GitSM(Git): | |||
199 | 199 | ||
200 | # Ensure the submodule repository is NOT set to bare, since we're checking it out... | 200 | # Ensure the submodule repository is NOT set to bare, since we're checking it out... |
201 | try: | 201 | try: |
202 | runfetchcmd("%s config core.bare false" % (ud.basecmd), d, quiet=True, workdir=os.path.join(repo_conf, 'modules', modpath)) | 202 | runfetchcmd("%s config core.bare false" % (ud.basecmd), d, quiet=True, workdir=os.path.join(repo_conf, 'modules', module)) |
203 | except: | 203 | except: |
204 | logger.error("Unable to set git config core.bare to false for %s" % os.path.join(repo_conf, 'modules', modpath)) | 204 | logger.error("Unable to set git config core.bare to false for %s" % os.path.join(repo_conf, 'modules', module)) |
205 | raise | 205 | raise |
206 | 206 | ||
207 | Git.unpack(self, ud, destdir, d) | 207 | Git.unpack(self, ud, destdir, d) |
@@ -209,5 +209,7 @@ class GitSM(Git): | |||
209 | ret = self.process_submodules(ud, ud.destdir, unpack_submodules, d) | 209 | ret = self.process_submodules(ud, ud.destdir, unpack_submodules, d) |
210 | 210 | ||
211 | if not ud.bareclone and ret: | 211 | if not ud.bareclone and ret: |
212 | # Run submodule update, this sets up the directories -- without touching the config | 212 | # All submodules should already be downloaded and configured in the tree. This simply sets |
213 | # up the configuration and checks out the files. The main project config should remain | ||
214 | # unmodified, and no download from the internet should occur. | ||
213 | runfetchcmd("%s submodule update --recursive --no-fetch" % (ud.basecmd), d, quiet=True, workdir=ud.destdir) | 215 | runfetchcmd("%s submodule update --recursive --no-fetch" % (ud.basecmd), d, quiet=True, workdir=ud.destdir) |