diff options
Diffstat (limited to 'bitbake/lib/bb/fetch2/gitsm.py')
-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 b21fed2669..54f99b1036 100644 --- a/bitbake/lib/bb/fetch2/gitsm.py +++ b/bitbake/lib/bb/fetch2/gitsm.py | |||
@@ -129,7 +129,7 @@ class GitSM(Git): | |||
129 | 129 | ||
130 | url += ';protocol=%s' % proto | 130 | url += ';protocol=%s' % proto |
131 | url += ";name=%s" % module | 131 | url += ";name=%s" % module |
132 | url += ";subpath=%s" % paths[module] | 132 | url += ";subpath=%s" % module |
133 | 133 | ||
134 | ld = d.createCopy() | 134 | ld = d.createCopy() |
135 | # Not necessary to set SRC_URI, since we're passing the URI to | 135 | # Not necessary to set SRC_URI, since we're passing the URI to |
@@ -176,7 +176,7 @@ class GitSM(Git): | |||
176 | 176 | ||
177 | try: | 177 | try: |
178 | newfetch = Fetch([url], d, cache=False) | 178 | newfetch = Fetch([url], d, cache=False) |
179 | newfetch.unpack(root=os.path.dirname(os.path.join(repo_conf, 'modules', modpath))) | 179 | newfetch.unpack(root=os.path.dirname(os.path.join(repo_conf, 'modules', module))) |
180 | except Exception as e: | 180 | except Exception as e: |
181 | logger.error('gitsm: submodule unpack failed: %s %s' % (type(e).__name__, str(e))) | 181 | logger.error('gitsm: submodule unpack failed: %s %s' % (type(e).__name__, str(e))) |
182 | raise | 182 | raise |
@@ -191,9 +191,9 @@ class GitSM(Git): | |||
191 | 191 | ||
192 | # Ensure the submodule repository is NOT set to bare, since we're checking it out... | 192 | # Ensure the submodule repository is NOT set to bare, since we're checking it out... |
193 | try: | 193 | try: |
194 | runfetchcmd("%s config core.bare false" % (ud.basecmd), d, quiet=True, workdir=os.path.join(repo_conf, 'modules', modpath)) | 194 | runfetchcmd("%s config core.bare false" % (ud.basecmd), d, quiet=True, workdir=os.path.join(repo_conf, 'modules', module)) |
195 | except: | 195 | except: |
196 | logger.error("Unable to set git config core.bare to false for %s" % os.path.join(repo_conf, 'modules', modpath)) | 196 | logger.error("Unable to set git config core.bare to false for %s" % os.path.join(repo_conf, 'modules', module)) |
197 | raise | 197 | raise |
198 | 198 | ||
199 | Git.unpack(self, ud, destdir, d) | 199 | Git.unpack(self, ud, destdir, d) |
@@ -201,5 +201,7 @@ class GitSM(Git): | |||
201 | ret = self.process_submodules(ud, ud.destdir, unpack_submodules, d) | 201 | ret = self.process_submodules(ud, ud.destdir, unpack_submodules, d) |
202 | 202 | ||
203 | if not ud.bareclone and ret: | 203 | if not ud.bareclone and ret: |
204 | # Run submodule update, this sets up the directories -- without touching the config | 204 | # All submodules should already be downloaded and configured in the tree. This simply sets |
205 | # up the configuration and checks out the files. The main project config should remain | ||
206 | # unmodified, and no download from the internet should occur. | ||
205 | runfetchcmd("%s submodule update --recursive --no-fetch" % (ud.basecmd), d, quiet=True, workdir=ud.destdir) | 207 | runfetchcmd("%s submodule update --recursive --no-fetch" % (ud.basecmd), d, quiet=True, workdir=ud.destdir) |