1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-02 01:19:52 +00:00

bitbake: toaster: Add distro selection support

Add the ability to select a distro in the project page,
based on values from the Layer Index. Add a distro selection
page with the add layer feature, based on the add machine
page.

[YOCTO #10632]

(Bitbake rev: a156a4eff67cdc3943494f5be72b96e3db656250)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
David Reyna
2017-06-27 13:44:30 -07:00
committed by Richard Purdie
parent 43aaa802c3
commit 4f2baebf36
12 changed files with 325 additions and 3 deletions
@@ -23,6 +23,7 @@ from django.core.management.base import BaseCommand
from orm.models import LayerSource, Layer, Release, Layer_Version
from orm.models import LayerVersionDependency, Machine, Recipe
from orm.models import Distro
import os
import sys
@@ -249,6 +250,24 @@ class Command(BaseCommand):
depends_on=lvd)
self.mini_progress("Layer version dependencies", i, total)
# update Distros
logger.info("Fetching distro information")
distros_info = _get_json_response(
apilinks['distros'] + "?filter=layerbranch__branch__name:%s" %
"OR".join(whitelist_branch_names))
total = len(distros_info)
for i, di in enumerate(distros_info):
distro, created = Distro.objects.get_or_create(
name=di['name'],
layer_version=Layer_Version.objects.get(
pk=li_layer_branch_id_to_toaster_lv_id[di['layerbranch']]))
distro.up_date = di['updated']
distro.name = di['name']
distro.description = di['description']
distro.save()
self.mini_progress("distros", i, total)
# update machines
logger.info("Fetching machine information")
machines_info = _get_json_response(