Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 04220E007F2; Tue, 8 Mar 2016 10:26:04 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [192.55.52.93 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 17E03E006AD for ; Tue, 8 Mar 2016 10:26:01 -0800 (PST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 08 Mar 2016 10:25:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,557,1449561600"; d="bb'?scan'208";a="665970158" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by FMSMGA003.fm.intel.com with ESMTP; 08 Mar 2016 10:25:36 -0800 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.174]) by irsmsx110.ger.corp.intel.com ([169.254.15.10]) with mapi id 14.03.0248.002; Tue, 8 Mar 2016 18:25:34 +0000 From: "Barros Pena, Belen" To: "Wood, Michael G" , "toaster@yoctoproject.org" Thread-Topic: [Toaster] [PATCH v2 5/5] toaster: orm generate CustomImageRecipe contents try secondary path Thread-Index: AQHReWfmb/iXq9OEjE2AkjhM0hgPNQ== Date: Tue, 8 Mar 2016 18:25:33 +0000 Message-ID: References: <1457114340-16784-1-git-send-email-michael.g.wood@intel.com> <1457366599-12973-1-git-send-email-michael.g.wood@intel.com> <1457366599-12973-5-git-send-email-michael.g.wood@intel.com> In-Reply-To: <1457366599-12973-5-git-send-email-michael.g.wood@intel.com> Accept-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.6.1.160122 x-originating-ip: [10.237.224.34] MIME-Version: 1.0 Subject: Re: [PATCH v2 5/5] toaster: orm generate CustomImageRecipe contents try secondary path X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2016 18:26:04 -0000 X-Groupsio-MsgNum: 4088 Content-Language: en-US Content-Type: multipart/mixed; boundary="_004_D304C51F75FACbelenbarrospenaintelcom_" --_004_D304C51F75FACbelenbarrospenaintelcom_ Content-Type: text/plain; charset="iso-8859-1" Content-ID: Content-Transfer-Encoding: quoted-printable On 07/03/2016 16:03, "toaster-bounces@yoctoproject.org on behalf of Michael Wood" 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=E9n > >Signed-off-by: Michael Wood >--- > 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 +=3D pkg.name+' ' >=20 > packages_conf +=3D "\"" >- >- base_recipe =3D open("%s/%s" % >- (self.base_recipe.layer_version.dirpath, >- self.base_recipe.file_path), 'r').read() >+ try: >+ base_recipe =3D 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 =3D open(self.base_recipe.file_path, 'r').read() >=20 > # Add a special case for when the recipe we have based a custom >image > # recipe on requires another recipe. >--=20 >2.5.0 > >--=20 >_______________________________________________ >toaster mailing list >toaster@yoctoproject.org >https://lists.yoctoproject.org/listinfo/toaster --_004_D304C51F75FACbelenbarrospenaintelcom_ Content-Type: application/octet-stream; name="morse-image-3_0.1.bb" Content-Description: morse-image-3_0.1.bb Content-Disposition: attachment; filename="morse-image-3_0.1.bb"; size=965; creation-date="Tue, 08 Mar 2016 18:25:33 GMT"; modification-date="Tue, 08 Mar 2016 18:25:33 GMT" Content-ID: <5DCFA9E7AEA4AC408BEFAFF26297D945@intel.com> Content-Transfer-Encoding: base64 IyBPcmlnaW5hbCByZWNpcGUgbW9yc2UtaW1hZ2UtMiAKIyBPcmlnaW5hbCByZWNpcGUgbW9yc2Ut aW1hZ2UtMSAKIyBPcmlnaW5hbCByZWNpcGUgY29yZS1pbWFnZS1taW5pbWFsIApTVU1NQVJZID0g IkEgc21hbGwgaW1hZ2UganVzdCBjYXBhYmxlIG9mIGFsbG93aW5nIGEgZGV2aWNlIHRvIGJvb3Qu IgoKSU1BR0VfSU5TVEFMTCA9ICJwYWNrYWdlZ3JvdXAtY29yZS1ib290ICR7Uk9PVEZTX1BLR01B TkFHRV9CT09UU1RSQVB9ICR7Q09SRV9JTUFHRV9FWFRSQV9JTlNUQUxMfSIKCklNQUdFX0xJTkdV QVMgPSAiICIKCkxJQ0VOU0UgPSAiTUlUIgoKaW5oZXJpdCBjb3JlLWltYWdlCgpJTUFHRV9ST09U RlNfU0laRSA/PSAiODE5MiIKSU1BR0VfUk9PVEZTX0VYVFJBX1NQQUNFX2FwcGVuZCA9ICIke0Bi Yi51dGlscy5jb250YWlucygiRElTVFJPX0ZFQVRVUkVTIiwgInN5c3RlbWQiLCAiICsgNDA5NiIs ICIiICxkKX0iCgoKIyBSZWNpcGUgbW9yc2UtaW1hZ2UtMSAKIyBDdXN0b21pc2F0aW9uIEdlbmVy YXRlZCBieSBUb2FzdGVyIG9uIDIwMTYtMDMtMDggMTc6MjQ6MTEKU1VNTUFSWSA9ICIiCkRFU0NS SVBUSU9OID0gIiIKTElDRU5TRSA9ICJNSVQiCklNQUdFX0lOU1RBTExfYXBwZW5kID0gIiBtb3Jz ZWFwcCAiCgojIFJlY2lwZSBtb3JzZS1pbWFnZS0yIAojIEN1c3RvbWlzYXRpb24gR2VuZXJhdGVk IGJ5IFRvYXN0ZXIgb24gMjAxNi0wMy0wOCAxNzozNzozMQpTVU1NQVJZID0gIiIKREVTQ1JJUFRJ T04gPSAiIgpMSUNFTlNFID0gIk1JVCIKSU1BR0VfSU5TVEFMTF9hcHBlbmQgPSAiIGhlbGxvICIK CiMgUmVjaXBlIG1vcnNlLWltYWdlLTMgCiMgQ3VzdG9taXNhdGlvbiBHZW5lcmF0ZWQgYnkgVG9h c3RlciBvbiAyMDE2LTAzLTA4IDE3OjU5OjEyClNVTU1BUlkgPSAiIgpERVNDUklQVElPTiA9ICIi CkxJQ0VOU0UgPSAiTUlUIgpJTUFHRV9JTlNUQUxMX2FwcGVuZCA9ICIgaGVsbG8tbW9kICI= --_004_D304C51F75FACbelenbarrospenaintelcom_ Content-Type: application/octet-stream; name="morse-image-2_0.1.bb" Content-Description: morse-image-2_0.1.bb Content-Disposition: attachment; filename="morse-image-2_0.1.bb"; size=764; creation-date="Tue, 08 Mar 2016 18:25:33 GMT"; modification-date="Tue, 08 Mar 2016 18:25:33 GMT" Content-ID: <5BFDFF752C66DA4386685670E243CAE3@intel.com> Content-Transfer-Encoding: base64 IyBPcmlnaW5hbCByZWNpcGUgbW9yc2UtaW1hZ2UtMSAKIyBPcmlnaW5hbCByZWNpcGUgY29yZS1p bWFnZS1taW5pbWFsIApTVU1NQVJZID0gIkEgc21hbGwgaW1hZ2UganVzdCBjYXBhYmxlIG9mIGFs bG93aW5nIGEgZGV2aWNlIHRvIGJvb3QuIgoKSU1BR0VfSU5TVEFMTCA9ICJwYWNrYWdlZ3JvdXAt Y29yZS1ib290ICR7Uk9PVEZTX1BLR01BTkFHRV9CT09UU1RSQVB9ICR7Q09SRV9JTUFHRV9FWFRS QV9JTlNUQUxMfSIKCklNQUdFX0xJTkdVQVMgPSAiICIKCkxJQ0VOU0UgPSAiTUlUIgoKaW5oZXJp dCBjb3JlLWltYWdlCgpJTUFHRV9ST09URlNfU0laRSA/PSAiODE5MiIKSU1BR0VfUk9PVEZTX0VY VFJBX1NQQUNFX2FwcGVuZCA9ICIke0BiYi51dGlscy5jb250YWlucygiRElTVFJPX0ZFQVRVUkVT IiwgInN5c3RlbWQiLCAiICsgNDA5NiIsICIiICxkKX0iCgoKIyBSZWNpcGUgbW9yc2UtaW1hZ2Ut MSAKIyBDdXN0b21pc2F0aW9uIEdlbmVyYXRlZCBieSBUb2FzdGVyIG9uIDIwMTYtMDMtMDggMTc6 MjQ6MTEKU1VNTUFSWSA9ICIiCkRFU0NSSVBUSU9OID0gIiIKTElDRU5TRSA9ICJNSVQiCklNQUdF X0lOU1RBTExfYXBwZW5kID0gIiBtb3JzZWFwcCAiCgojIFJlY2lwZSBtb3JzZS1pbWFnZS0yIAoj IEN1c3RvbWlzYXRpb24gR2VuZXJhdGVkIGJ5IFRvYXN0ZXIgb24gMjAxNi0wMy0wOCAxNzo1OTow NApTVU1NQVJZID0gIiIKREVTQ1JJUFRJT04gPSAiIgpMSUNFTlNFID0gIk1JVCIKSU1BR0VfSU5T VEFMTF9hcHBlbmQgPSAiIGhlbGxvICI= --_004_D304C51F75FACbelenbarrospenaintelcom_ Content-Type: application/octet-stream; name="morse-image-1_0.1.bb" Content-Description: morse-image-1_0.1.bb Content-Disposition: attachment; filename="morse-image-1_0.1.bb"; size=567; creation-date="Tue, 08 Mar 2016 18:25:33 GMT"; modification-date="Tue, 08 Mar 2016 18:25:33 GMT" Content-ID: <0A81328206C3284A8A99149EF5283CD5@intel.com> Content-Transfer-Encoding: base64 IyBPcmlnaW5hbCByZWNpcGUgY29yZS1pbWFnZS1taW5pbWFsIApTVU1NQVJZID0gIkEgc21hbGwg aW1hZ2UganVzdCBjYXBhYmxlIG9mIGFsbG93aW5nIGEgZGV2aWNlIHRvIGJvb3QuIgoKSU1BR0Vf SU5TVEFMTCA9ICJwYWNrYWdlZ3JvdXAtY29yZS1ib290ICR7Uk9PVEZTX1BLR01BTkFHRV9CT09U U1RSQVB9ICR7Q09SRV9JTUFHRV9FWFRSQV9JTlNUQUxMfSIKCklNQUdFX0xJTkdVQVMgPSAiICIK CkxJQ0VOU0UgPSAiTUlUIgoKaW5oZXJpdCBjb3JlLWltYWdlCgpJTUFHRV9ST09URlNfU0laRSA/ PSAiODE5MiIKSU1BR0VfUk9PVEZTX0VYVFJBX1NQQUNFX2FwcGVuZCA9ICIke0BiYi51dGlscy5j b250YWlucygiRElTVFJPX0ZFQVRVUkVTIiwgInN5c3RlbWQiLCAiICsgNDA5NiIsICIiICxkKX0i CgoKIyBSZWNpcGUgbW9yc2UtaW1hZ2UtMSAKIyBDdXN0b21pc2F0aW9uIEdlbmVyYXRlZCBieSBU b2FzdGVyIG9uIDIwMTYtMDMtMDggMTc6NTg6NTUKU1VNTUFSWSA9ICIiCkRFU0NSSVBUSU9OID0g IiIKTElDRU5TRSA9ICJNSVQiCklNQUdFX0lOU1RBTExfYXBwZW5kID0gIiBtb3JzZWFwcCAi --_004_D304C51F75FACbelenbarrospenaintelcom_--