diff options
Diffstat (limited to 'bitbake/lib/layerindexlib/cooker.py')
-rw-r--r-- | bitbake/lib/layerindexlib/cooker.py | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/bitbake/lib/layerindexlib/cooker.py b/bitbake/lib/layerindexlib/cooker.py index 248a597754..848f0e2ee2 100644 --- a/bitbake/lib/layerindexlib/cooker.py +++ b/bitbake/lib/layerindexlib/cooker.py | |||
@@ -136,10 +136,13 @@ class CookerPlugin(layerindexlib.plugin.IndexPlugin): | |||
136 | layerrev = self._run_command('git rev-parse HEAD', layerpath, default="<unknown>") | 136 | layerrev = self._run_command('git rev-parse HEAD', layerpath, default="<unknown>") |
137 | 137 | ||
138 | for remotes in self._run_command('git remote -v', layerpath, default="").split("\n"): | 138 | for remotes in self._run_command('git remote -v', layerpath, default="").split("\n"): |
139 | remote = remotes.split("\t")[1].split(" ")[0] | 139 | if not remotes: |
140 | if "(fetch)" == remotes.split("\t")[1].split(" ")[1]: | 140 | layerurl = self._handle_git_remote(layerpath) |
141 | layerurl = self._handle_git_remote(remote) | 141 | else: |
142 | break | 142 | remote = remotes.split("\t")[1].split(" ")[0] |
143 | if "(fetch)" == remotes.split("\t")[1].split(" ")[1]: | ||
144 | layerurl = self._handle_git_remote(remote) | ||
145 | break | ||
143 | 146 | ||
144 | layerItemId += 1 | 147 | layerItemId += 1 |
145 | index.layerItems[layerItemId] = layerindexlib.LayerItem(index, None) | 148 | index.layerItems[layerItemId] = layerindexlib.LayerItem(index, None) |
@@ -297,7 +300,7 @@ class CookerPlugin(layerindexlib.plugin.IndexPlugin): | |||
297 | 300 | ||
298 | for layerBranchId in index.layerBranches: | 301 | for layerBranchId in index.layerBranches: |
299 | # load_bblayers uses the description to cache the actual path... | 302 | # load_bblayers uses the description to cache the actual path... |
300 | machine_path = index.layerBranches[layerBranchId].getDescription() | 303 | machine_path = index.layerBranches[layerBranchId].layer.description |
301 | machine_path = os.path.join(machine_path, 'conf/machine') | 304 | machine_path = os.path.join(machine_path, 'conf/machine') |
302 | if os.path.isdir(machine_path): | 305 | if os.path.isdir(machine_path): |
303 | for (dirpath, _, filenames) in os.walk(machine_path): | 306 | for (dirpath, _, filenames) in os.walk(machine_path): |
@@ -310,7 +313,7 @@ class CookerPlugin(layerindexlib.plugin.IndexPlugin): | |||
310 | machine = layerindexlib.Machine(index, None) | 313 | machine = layerindexlib.Machine(index, None) |
311 | machine.define_data(id=machineId, name=fname[:-5], | 314 | machine.define_data(id=machineId, name=fname[:-5], |
312 | description=fname[:-5], | 315 | description=fname[:-5], |
313 | layerbranch=collection_layerbranch[entry]) | 316 | layerbranch=index.layerBranches[layerBranchId]) |
314 | 317 | ||
315 | index.add_element("machines", [machine]) | 318 | index.add_element("machines", [machine]) |
316 | 319 | ||
@@ -321,7 +324,7 @@ class CookerPlugin(layerindexlib.plugin.IndexPlugin): | |||
321 | 324 | ||
322 | for layerBranchId in index.layerBranches: | 325 | for layerBranchId in index.layerBranches: |
323 | # load_bblayers uses the description to cache the actual path... | 326 | # load_bblayers uses the description to cache the actual path... |
324 | distro_path = index.layerBranches[layerBranchId].getDescription() | 327 | distro_path = index.layerBranches[layerBranchId].layer.description |
325 | distro_path = os.path.join(distro_path, 'conf/distro') | 328 | distro_path = os.path.join(distro_path, 'conf/distro') |
326 | if os.path.isdir(distro_path): | 329 | if os.path.isdir(distro_path): |
327 | for (dirpath, _, filenames) in os.walk(distro_path): | 330 | for (dirpath, _, filenames) in os.walk(distro_path): |
@@ -334,7 +337,7 @@ class CookerPlugin(layerindexlib.plugin.IndexPlugin): | |||
334 | distro = layerindexlib.Distro(index, None) | 337 | distro = layerindexlib.Distro(index, None) |
335 | distro.define_data(id=distroId, name=fname[:-5], | 338 | distro.define_data(id=distroId, name=fname[:-5], |
336 | description=fname[:-5], | 339 | description=fname[:-5], |
337 | layerbranch=collection_layerbranch[entry]) | 340 | layerbranch=index.layerBranches[layerBranchId]) |
338 | 341 | ||
339 | index.add_element("distros", [distro]) | 342 | index.add_element("distros", [distro]) |
340 | 343 | ||