On 10/03/2016 14:28, "[email protected] on behalf of
Michael Wood" <[email protected] on behalf of
[email protected]> wrote:

>Add additional metadata to the layer created for build history to be
>able to identify the layer and recipe later on. Specifically this is the
>branch and release to which the recipe and layer are associated with
>enabling differentiation of two recipes which are local release and
>master and 'master' release.
>
>[YOCTO #8528]

I can't get this to work, I'm afraid. This is what I did:

* Created a project with the local release
* Built core-image-minimal
* When the build finished, went to the image recipes page

It still shows 0 image recipes.

>[YOCTO #8545]

This totally works :)

Thanks!

Belén

>
>Signed-off-by: Michael Wood <[email protected]>
>---
> bitbake/lib/bb/ui/buildinfohelper.py | 31 ++++++++++++++++++++-----------
> 1 file changed, 20 insertions(+), 11 deletions(-)
>
>diff --git a/bitbake/lib/bb/ui/buildinfohelper.py
>b/bitbake/lib/bb/ui/buildinfohelper.py
>index 7805086..6b19fda 100644
>--- a/bitbake/lib/bb/ui/buildinfohelper.py
>+++ b/bitbake/lib/bb/ui/buildinfohelper.py
>@@ -355,12 +355,17 @@ class ORMWrapper(object):
> 
>             # create a new copy of this layer version as a snapshot for
>             # historical purposes
>-            layer_copy, c =
>Layer_Version.objects.get_or_create(build=build_obj,
>-                            layer=layer_obj.layer,
>-                            commit=layer_version_information['commit'],
>-                            local_path =
>layer_version_information['local_path'],
>-                            )
>-            logger.info("created new historical layer version %d",
>layer_copy.pk)
>+            layer_copy, c = Layer_Version.objects.get_or_create(
>+                build=build_obj,
>+                layer=layer_obj.layer,
>+                up_branch=layer_obj.up_branch,
>+                branch=layer_version_information['branch'],
>+                commit=layer_version_information['commit'],
>+                local_path=layer_version_information['local_path'],
>+            )
>+
>+            logger.info("created new historical layer version %d",
>+                        layer_copy.pk)
> 
>             self.layer_version_built.append(layer_copy)
> 
>@@ -581,11 +586,15 @@ class ORMWrapper(object):
>                 
>packagedict[p]['object'].package_dependencies_target.all().delete()
>                 
>packagedict[p]['object'].package_dependencies_source.all().delete()
>                 try:
>-                    recipe = self._cached_get(Recipe,
>-                                              name=built_recipe.name,
>-                                              layer_version__build=None,
>-                 
>file_path=built_recipe.file_path,
>-                 
>version=built_recipe.version)
>+                    recipe = self._cached_get(
>+                        Recipe,
>+                        name=built_recipe.name,
>+                        layer_version__build=None,
>+                        layer_version__up_branch=
>+                        built_recipe.layer_version.up_branch,
>+                        file_path=built_recipe.file_path,
>+                        version=built_recipe.version
>+                    )
>                 except (Recipe.DoesNotExist,
>                         Recipe.MultipleObjectsReturned) as e:
>                     logger.info("We did not find one recipe for the"
>-- 
>2.1.4
>
>-- 
>_______________________________________________
>toaster mailing list
>[email protected]
>https://lists.yoctoproject.org/listinfo/toaster

-- 
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster

Reply via email to