All of lore.kernel.org
 help / color / mirror / Atom feed
* ✗ patchtest: failure for image.bbclass: delete DATE variable too
  2017-08-25  9:59 [PATCH] image.bbclass: delete DATE variable too Stefan Agner
@ 2017-08-11  3:31 ` Patchwork
  2017-08-15 10:37 ` two recipes, one replaces files of another Dvorkin Dmitry
  1 sibling, 0 replies; 7+ messages in thread
From: Patchwork @ 2017-08-11  3:31 UTC (permalink / raw)
  To: Stefan Agner; +Cc: openembedded-core

== Series Details ==

Series: image.bbclass: delete DATE variable too
Revision: 1
URL   : https://patchwork.openembedded.org/series/8180/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  master (currently at df7f5221a5)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 7+ messages in thread

* two recipes, one replaces files of another
  2017-08-25  9:59 [PATCH] image.bbclass: delete DATE variable too Stefan Agner
  2017-08-11  3:31 ` ✗ patchtest: failure for " Patchwork
@ 2017-08-15 10:37 ` Dvorkin Dmitry
  2017-08-15 10:59   ` Alexander Kanavin
  1 sibling, 1 reply; 7+ messages in thread
From: Dvorkin Dmitry @ 2017-08-15 10:37 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 715 bytes --]

Good time of day, people!

I have two recipes for two cases:
recipe-brdRevA.bb
recipe-brdRevB.bb

both of them has one file:
/etc/myprog/c.conf

and two image definition files:
imgA.bb
imgB.bb

, that requires recipe-brdRevA.bb or recipe-brdRevB.bb indirectly by 
IMAGE_INSTALL += "myprog"

myprog.bb requires files from recipe-brdRevA or recipe-brdRevB, 
depending on image.

It's not a correct idea to add IMAGE_INSTALL += "recipe-brdRev<N>" into 
img<N>.bb explicitely.

How to create dependencies correctly?
I try to add
RPROVIDES_${PN} += "recipe-brd" in both recipe-brdRevA/B  and use 
PREFERRED_PROVIDER_recipe-brd = "..."
into imgA/B.bb without success.

Please, advice me.



[-- Attachment #2: dvorkin.vcf --]
[-- Type: text/x-vcard, Size: 315 bytes --]

begin:vcard
fn:Dmitry Dvorkin
n:Dvorkin;Dmitry
org:Tibbo Technology Inc.;Tibbo Engeneering
adr:;;9F-3, No.31, Lane 169, Kang-Ning St., Hsi-Chih, New Taipei City;Taipei;Taipei;22180;Taiwan
email;internet:dvorkin@tibbo.com
title:Embedded Linux System Architect
url:http://tibbo.com/
version:2.1
end:vcard


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: two recipes, one replaces files of another
  2017-08-15 10:37 ` two recipes, one replaces files of another Dvorkin Dmitry
@ 2017-08-15 10:59   ` Alexander Kanavin
  2017-08-15 14:21     ` Dvorkin Dmitry
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Kanavin @ 2017-08-15 10:59 UTC (permalink / raw)
  To: Dvorkin Dmitry, openembedded-core

On 08/15/2017 01:37 PM, Dvorkin Dmitry wrote:
> How to create dependencies correctly?
> I try to add
> RPROVIDES_${PN} += "recipe-brd" in both recipe-brdRevA/B  and use 
> PREFERRED_PROVIDER_recipe-brd = "..."
> into imgA/B.bb without success.

PREFERRED_PROVIDER is the right way to go. That's how a kernel variant 
is selected from multiple choices (regular, tiny, real time) for example 
- have a look at how it's done.

Alex


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: two recipes, one replaces files of another
  2017-08-15 10:59   ` Alexander Kanavin
@ 2017-08-15 14:21     ` Dvorkin Dmitry
  2017-08-15 14:38       ` Alexander Kanavin
  0 siblings, 1 reply; 7+ messages in thread
From: Dvorkin Dmitry @ 2017-08-15 14:21 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core

[-- Attachment #1: Type: text/plain, Size: 760 bytes --]

Thank you, Alexander!

But according to this

https://lists.yoctoproject.org/pipermail/yocto/2013-January/011855.html

PREFERRED_PROVIDER_... can't be used in image recipes, only at top-level 
configuration files.

I can't make it work...


On 15.08.2017 13:59, Alexander Kanavin wrote:
> On 08/15/2017 01:37 PM, Dvorkin Dmitry wrote:
>> How to create dependencies correctly?
>> I try to add
>> RPROVIDES_${PN} += "recipe-brd" in both recipe-brdRevA/B  and use 
>> PREFERRED_PROVIDER_recipe-brd = "..."
>> into imgA/B.bb without success.
>
> PREFERRED_PROVIDER is the right way to go. That's how a kernel variant 
> is selected from multiple choices (regular, tiny, real time) for 
> example - have a look at how it's done.
>
> Alex


[-- Attachment #2: dvorkin.vcf --]
[-- Type: text/x-vcard, Size: 315 bytes --]

begin:vcard
fn:Dmitry Dvorkin
n:Dvorkin;Dmitry
org:Tibbo Technology Inc.;Tibbo Engeneering
adr:;;9F-3, No.31, Lane 169, Kang-Ning St., Hsi-Chih, New Taipei City;Taipei;Taipei;22180;Taiwan
email;internet:dvorkin@tibbo.com
title:Embedded Linux System Architect
url:http://tibbo.com/
version:2.1
end:vcard


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: two recipes, one replaces files of another
  2017-08-15 14:21     ` Dvorkin Dmitry
@ 2017-08-15 14:38       ` Alexander Kanavin
  2017-08-18  6:16         ` Dvorkin Dmitry
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Kanavin @ 2017-08-15 14:38 UTC (permalink / raw)
  To: Dvorkin Dmitry, openembedded-core

On 08/15/2017 05:21 PM, Dvorkin Dmitry wrote:
> Thank you, Alexander!
> 
> But according to this
> 
> https://lists.yoctoproject.org/pipermail/yocto/2013-January/011855.html
> 
> PREFERRED_PROVIDER_... can't be used in image recipes, only at top-level 
> configuration files.
> 
> I can't make it work...


I think you can solve this by defining two machines: brdRevA and 
brdRevB. Then set PREFERRED_PROVIDER in the machine definitions.
And have just one recipe for the image.

You should not make image recipes hardware-specific anyway; any image 
recipe should work on any hardware, and details specific to the hardware 
are abstracted to the machine definition.

Alex


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: two recipes, one replaces files of another
  2017-08-15 14:38       ` Alexander Kanavin
@ 2017-08-18  6:16         ` Dvorkin Dmitry
  0 siblings, 0 replies; 7+ messages in thread
From: Dvorkin Dmitry @ 2017-08-18  6:16 UTC (permalink / raw)
  To: Alexander Kanavin, openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1184 bytes --]

Thanks!

The problem is that this two machines are the same, except only one 
configuration file.
Bootloader files are build for two machines with the same image. Linux 
kernel is the same the small  difference is in two separate DTS files only.
Everything else is the same.
I don't like dirty hacks. If somebody knows the good way to set 
preference in non-root configuration files - please, advice me.

On 15.08.2017 17:38, Alexander Kanavin wrote:
> On 08/15/2017 05:21 PM, Dvorkin Dmitry wrote:
>> Thank you, Alexander!
>>
>> But according to this
>>
>> https://lists.yoctoproject.org/pipermail/yocto/2013-January/011855.html
>>
>> PREFERRED_PROVIDER_... can't be used in image recipes, only at 
>> top-level configuration files.
>>
>> I can't make it work...
>
>
> I think you can solve this by defining two machines: brdRevA and 
> brdRevB. Then set PREFERRED_PROVIDER in the machine definitions.
> And have just one recipe for the image.
>
> You should not make image recipes hardware-specific anyway; any image 
> recipe should work on any hardware, and details specific to the 
> hardware are abstracted to the machine definition.
>
> Alex


[-- Attachment #2: dvorkin.vcf --]
[-- Type: text/x-vcard, Size: 315 bytes --]

begin:vcard
fn:Dmitry Dvorkin
n:Dvorkin;Dmitry
org:Tibbo Technology Inc.;Tibbo Engeneering
adr:;;9F-3, No.31, Lane 169, Kang-Ning St., Hsi-Chih, New Taipei City;Taipei;Taipei;22180;Taiwan
email;internet:dvorkin@tibbo.com
title:Embedded Linux System Architect
url:http://tibbo.com/
version:2.1
end:vcard


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] image.bbclass: delete DATE variable too
@ 2017-08-25  9:59 Stefan Agner
  2017-08-11  3:31 ` ✗ patchtest: failure for " Patchwork
  2017-08-15 10:37 ` two recipes, one replaces files of another Dvorkin Dmitry
  0 siblings, 2 replies; 7+ messages in thread
From: Stefan Agner @ 2017-08-25  9:59 UTC (permalink / raw)
  To: openembedded-core; +Cc: Stefan Agner

From: Stefan Agner <stefan.agner@toradex.com>

When creating a custom image which uses the DATE variable the basehash
seems to change every day and lead to errors such as:
ERROR: console-tdx-image-2.7.6-r0 do_image_customimg: Error executing a python function in exec_python_func() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:set_image_size(d)
...

Add DATE to the variables which should not get expanded early and to the
vardepsexclude list for the image task.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
---
I am not that deep in OE usually and I am not sure if I miss something
completely here... It seems to solve the issue for us though. Does that
change sounds reasonable? Could it be done in the custom image class file?

 meta/classes/image.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 6111f6d..443f822 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -440,6 +440,7 @@ python () {
         # date/time values. It will get expanded at execution time.
         # Similarly TMPDIR since otherwise we see QA stamp comparision problems
         localdata.delVar('DATETIME')
+        localdata.delVar('DATE')
         localdata.delVar('TMPDIR')
 
         image_cmd = localdata.getVar("IMAGE_CMD", True)
@@ -503,7 +504,7 @@ python () {
         d.setVarFlag('do_image_%s' % t, 'postfuncs', 'create_symlinks')
         d.setVarFlag('do_image_%s' % t, 'subimages', ' '.join(subimages))
         d.appendVarFlag('do_image_%s' % t, 'vardeps', ' '.join(vardeps))
-        d.appendVarFlag('do_image_%s' % t, 'vardepsexclude', 'DATETIME')
+        d.appendVarFlag('do_image_%s' % t, 'vardepsexclude', 'DATETIME DATE')
 
         bb.debug(2, "Adding type %s before %s, after %s" % (t, 'do_image_complete', after))
         bb.build.addtask('do_image_%s' % t, 'do_image_complete', after, d)
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-08-18  6:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-25  9:59 [PATCH] image.bbclass: delete DATE variable too Stefan Agner
2017-08-11  3:31 ` ✗ patchtest: failure for " Patchwork
2017-08-15 10:37 ` two recipes, one replaces files of another Dvorkin Dmitry
2017-08-15 10:59   ` Alexander Kanavin
2017-08-15 14:21     ` Dvorkin Dmitry
2017-08-15 14:38       ` Alexander Kanavin
2017-08-18  6:16         ` Dvorkin Dmitry

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.