diff options
Diffstat (limited to 'bitbake/lib/toaster/orm/management/commands/lsupdates.py')
| -rw-r--r-- | bitbake/lib/toaster/orm/management/commands/lsupdates.py | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/bitbake/lib/toaster/orm/management/commands/lsupdates.py b/bitbake/lib/toaster/orm/management/commands/lsupdates.py index 138b686eb5..be63a85859 100644 --- a/bitbake/lib/toaster/orm/management/commands/lsupdates.py +++ b/bitbake/lib/toaster/orm/management/commands/lsupdates.py | |||
| @@ -102,14 +102,24 @@ class Command(NoArgsCommand): | |||
| 102 | logger.info("Fetching metadata releases for %s", | 102 | logger.info("Fetching metadata releases for %s", |
| 103 | " ".join(whitelist_branch_names)) | 103 | " ".join(whitelist_branch_names)) |
| 104 | 104 | ||
| 105 | # keep a track of the id mappings so that layer_versions can be created | 105 | branches_info = _get_json_response(apilinks['branches'] + |
| 106 | # for these layers later on | 106 | "?filter=name:%s" |
| 107 | % "OR".join(whitelist_branch_names)) | ||
| 108 | |||
| 109 | # Map the layer index branches to toaster releases | ||
| 110 | li_branch_id_to_toaster_release = {} | ||
| 111 | |||
| 112 | total = len(branches_info) | ||
| 113 | for i, branch in enumerate(branches_info): | ||
| 114 | li_branch_id_to_toaster_release[branch['id']] = \ | ||
| 115 | Release.objects.get(name=branch['name']) | ||
| 116 | self.mini_progress("Releases", i, total) | ||
| 117 | |||
| 118 | # keep a track of the layerindex (li) id mappings so that | ||
| 119 | # layer_versions can be created for these layers later on | ||
| 107 | li_layer_id_to_toaster_layer_id = {} | 120 | li_layer_id_to_toaster_layer_id = {} |
| 108 | 121 | ||
| 109 | # We may need this? TODO | 122 | logger.info("Fetching layers") |
| 110 | #branches_info = _get_json_response(apilinks['branches'] + | ||
| 111 | # "?filter=name:%s" | ||
| 112 | # % "OR".join(whitelist_branch_names)) | ||
| 113 | 123 | ||
| 114 | layers_info = _get_json_response(apilinks['layerItems']) | 124 | layers_info = _get_json_response(apilinks['layerItems']) |
| 115 | 125 | ||
| @@ -179,6 +189,7 @@ class Command(NoArgsCommand): | |||
| 179 | lbi['layer']) | 189 | lbi['layer']) |
| 180 | continue | 190 | continue |
| 181 | 191 | ||
| 192 | lv.release = li_branch_id_to_toaster_release[lbi['branch']] | ||
| 182 | lv.up_date = lbi['updated'] | 193 | lv.up_date = lbi['updated'] |
| 183 | lv.commit = lbi['actual_branch'] | 194 | lv.commit = lbi['actual_branch'] |
| 184 | lv.dirpath = lbi['vcs_subdir'] | 195 | lv.dirpath = lbi['vcs_subdir'] |
