[Toaster] [PATCH v2 5/5] toaster: orm generate CustomImageRecipe contents try secondary path
Barros Pena, Belen
belen.barros.pena at intel.com
Tue Mar 8 10:25:33 PST 2016
On 07/03/2016 16:03, "toaster-bounces at yoctoproject.org on behalf of
Michael Wood" <toaster-bounces at yoctoproject.org on behalf of
michael.g.wood at intel.com> wrote:
>Try a secondary file path if the first does not exist. When we get the
>recipe paths and layer information from the layer index it is not a
>complete path but we are usually able to reconstruct it. If the complete
>real path has been discovered by building then use this instead.
>
>[YOCTO #9206]
I think this is working... I think. This is what I did:
1. Create a custom image called morse-image-1 based on core-image-minimal
and add a package called 'morseapp' from my local imported layer. Build.
This image reported 29 packages.
2. Create a custom image based on morse-image-1 called morse-image-2 and
add a package called 'hello' from my local imported layer. Build. This
image reported 30 packages.
3. Create a custom image based morse-image-2 called morse-image-3 and add
a package called 'hello-mod' from my local imported layer. Build. This
image reported 32 packages.
After doing all this, I went to the 'custom images' page, and there
Toaster says that morse-image-1 has 30 packages (instead of the initial
29). But, if you actually go to the details page for morse-image-1, and
apply the package included filter, it shows and displays 29 packages :/ I
have seen this before, but only on Jethro builds, never on master ones.
The other thing is about the content of the bb files: the "Customisation
Generated by Toaster on" section, which includes SUMMARY, DESCRIPTION,
LICENCE and IMAGE_INSTALL_append, is repeated. It's hard to explain, so
I've attached the files. Maybe this is harmless, but I thought I'd let you
know.
Cheers
Belén
>
>Signed-off-by: Michael Wood <michael.g.wood at intel.com>
>---
> bitbake/lib/toaster/orm/models.py | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
>diff --git a/bitbake/lib/toaster/orm/models.py
>b/bitbake/lib/toaster/orm/models.py
>index d451989..b89bfa9 100644
>--- a/bitbake/lib/toaster/orm/models.py
>+++ b/bitbake/lib/toaster/orm/models.py
>@@ -1515,10 +1515,13 @@ class CustomImageRecipe(Recipe):
> packages_conf += pkg.name+' '
>
> packages_conf += "\""
>-
>- base_recipe = open("%s/%s" %
>- (self.base_recipe.layer_version.dirpath,
>- self.base_recipe.file_path), 'r').read()
>+ try:
>+ base_recipe = open("%s/%s" %
>+ (self.base_recipe.layer_version.dirpath,
>+ self.base_recipe.file_path), 'r').read()
>+ except IOError:
>+ # The path may now be the full path if the recipe has been
>built
>+ base_recipe = open(self.base_recipe.file_path, 'r').read()
>
> # Add a special case for when the recipe we have based a custom
>image
> # recipe on requires another recipe.
>--
>2.5.0
>
>--
>_______________________________________________
>toaster mailing list
>toaster at yoctoproject.org
>https://lists.yoctoproject.org/listinfo/toaster
-------------- next part --------------
A non-text attachment was scrubbed...
Name: morse-image-3_0.1.bb
Type: application/octet-stream
Size: 965 bytes
Desc: morse-image-3_0.1.bb
URL: <http://lists.yoctoproject.org/pipermail/toaster/attachments/20160308/35b4cec2/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: morse-image-2_0.1.bb
Type: application/octet-stream
Size: 764 bytes
Desc: morse-image-2_0.1.bb
URL: <http://lists.yoctoproject.org/pipermail/toaster/attachments/20160308/35b4cec2/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: morse-image-1_0.1.bb
Type: application/octet-stream
Size: 567 bytes
Desc: morse-image-1_0.1.bb
URL: <http://lists.yoctoproject.org/pipermail/toaster/attachments/20160308/35b4cec2/attachment-0002.obj>
More information about the toaster
mailing list