Skip to contentSkip to conversation

swupd-image.bbclass: do_swupd_update() depends on time-native

PATCH In review André Draszik 2 participants 6 messages Jan 17, 2017 – Jan 23, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 swupd-image.bbclass: do_swupd_update() depends on time-native

From: André Draszik <[email protected]>

The shell script uses time, which is either a bash built-in, or a GNU utility. Not all build machines will have either bash or GNU time available out of the box. Make sure it is available.

Note that this needs the patch to OE-core to enable the time-native BBCLASSEXTEND to be applied before this here can go in.

---
 classes/swupd-image.bbclass | 1 +
 1 file changed, 1 insertion(+)
classes/swupd-image.bbclass +1 -0
index 5ba9cfb..60f7edb 100644
@@ -563,6 +563,7 @@ SWUPDDEPENDS = "\
     virtual/fakeroot-native:do_populate_sysroot \
     rsync-native:do_populate_sysroot \
     bsdiff-native:do_populate_sysroot \
+    time-native:do_populate_sysroot \
 "
 
 # We don't know exactly which formats will be in use during
Signature · 1 line
2.11.0
#1 lore raw
Quoted 3 lines · André Draszik

The shell script uses time, which is either a bash built-in, or a GNU utility. Not all build machines will have either bash or GNU time available out of the box. Make sure it is available.

Good catch. I'm just wondering whether it wouldn't be simpler to remove the usage of "time" instead, or make it optional?

The "time" utility was useful while working on performance of the code, but now that this is done, it's merely nice to have when one can get it for free, which isn't the case when time-native has to be compiled first.

Signature · 6 lines
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.
#2 lore raw
Quoted 9 lines · Patrick Ohly
Quoted 3 lines · André Draszik

The shell script uses time, which is either a bash built-in, or a GNU utility. Not all build machines will have either bash or GNU time available out of the box. Make sure it is available.

Good catch. I'm just wondering whether it wouldn't be simpler to remove the usage of "time" instead, or make it optional?

The "time" utility was useful while working on performance of the code,

I thought the same, and was contemplating removing its use...

Quoted 1 line

but now that this is done, it's merely nice to have when one can get it

...but I was curious as well, so I left it in and added the dependency.

Quoted 2 lines

for free, which isn't the case when time-native has to be compiled first.

It's a one-time host-depend, which should also be satisfied from sstate after that, so I thought it'd be OK to keep it.

I have no preference either way.

Cheers,
Andre'

#3 lore raw
Quoted 1 line · André Draszik

I have no preference either way.

Let's remove the hard dependency. I've posted a "swupd-image.bbclass:
avoid depending on time command" patch which does that. Are you okay with that?

Signature · 6 lines
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.
#4 lore raw

On 23 Jan 2017 13:27, "Patrick Ohly" <[email protected]> wrote:

Quoted 1 line · André Draszik

I have no preference either way.

Let's remove the hard dependency. I've posted a "swupd-image.bbclass:
avoid depending on time command" patch which does that. Are you okay with that?

Sure, thanks Patrick.

#5 lore raw
In reply to André Draszik
Quoted 3 lines · André Draszik

Note that this needs the patch to OE-core to enable the time-native BBCLASSEXTEND to be applied before this here can go in.

The OE-core patch is in OE master now.

A.