Skip to contentSkip to conversation

Xen: fix do_deploy dependencies

PATCH Bertrand Marquis 3 participants 8 messages Feb 19, 2020 – Feb 24, 2020 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 6 lines · Bertrand Marquis via Lists.Yoctoproject.Org

do_deploy is using the files installed during do_install and it must be executed after it but before do_build. This is fixing SSTATE behaviour which had previously an empty scene in some cases.

Any chance somebody could check and ack on this ?

While there, it would make sense to also push this in zeus branch.

—
Bertrand Marquis

Quoted 21 lines
Change-Id I04b1f652c697ed0bc7e262571dd03e123ac096f6

---
recipes-extended/xen/xen.inc | 4 +++-

1 file changed, 3 insertions(+), 1 deletion(-)
recipes-extended/xen/xen.inc +3 -1
index 36ab78e..41b1983 100644
@@ -1099,7 +1099,9 @@ do_deploy() {
    fi
 }
 
-addtask deploy after do_populate_sysroot
+# do_deploy is using files created during do_install so force it to be called
+# after do_install but before do_build
+addtask deploy before do_build after do_install
 
 # Enable use of menuconfig directly from bitbake and also within the devshell
Quoted 4 lines

OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS TERMINFO" --
2.17.1

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

#2 lore raw
Quoted 10 lines · Bertrand Marquis
Quoted 7 lines · Bertrand Marquis via Lists.Yoctoproject.Org

do_deploy is using the files installed during do_install and it must be executed after it but before do_build. This is fixing SSTATE behaviour which had previously an empty scene in some cases.

Any chance somebody could check and ack on this ?

There's an entire update / re-work of Xen on the mailing list. I won't be merging any Xen patches until we have that sorted out.

Cheers,

Bruce

Quoted 32 lines

While there, it would make sense to also push this in zeus branch.

—
Bertrand Marquis

Quoted 21 lines
Change-Id I04b1f652c697ed0bc7e262571dd03e123ac096f6

---
recipes-extended/xen/xen.inc | 4 +++-

1 file changed, 3 insertions(+), 1 deletion(-)
recipes-extended/xen/xen.inc +3 -1
index 36ab78e..41b1983 100644
@@ -1099,7 +1099,9 @@ do_deploy() {
    fi
 }
 
-addtask deploy after do_populate_sysroot
+# do_deploy is using files created during do_install so force it to be called
+# after do_install but before do_build
+addtask deploy before do_build after do_install
 
 # Enable use of menuconfig directly from bitbake and also within the devshell
Quoted 4 lines

OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS TERMINFO" --
2.17.1

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
#3 lore raw

On 19 Feb 2020, at 13:31, Bruce Ashfield <[email protected]<mailto:[email protected]>> wrote:

On Wed, Feb 19, 2020 at 8:09 AM Bertrand Marquis <[email protected]<mailto:[email protected]>> wrote:

On 14 Feb 2020, at 10:17, Bertrand Marquis via Lists.Yoctoproject.Org<http://lists.yoctoproject.org/> <[email protected]<mailto:[email protected]>> wrote:

do_deploy is using the files installed during do_install and it must be executed after it but before do_build. This is fixing SSTATE behaviour which had previously an empty scene in some cases.

Any chance somebody could check and ack on this ?

There's an entire update / re-work of Xen on the mailing list. I won't be merging any Xen patches until we have that sorted out.

Ok I will re-push my patch once the changes in Xen are merged then.

Cheers
Bertrand

Cheers,

Bruce

While there, it would make sense to also push this in zeus branch.

—
Bertrand Marquis

Change-Id I04b1f652c697ed0bc7e262571dd03e123ac096f6

---
recipes-extended/xen/xen.inc | 4 +++-

1 file changed, 3 insertions(+), 1 deletion(-)
recipes-extended/xen/xen.inc +0 -0
index 36ab78e..41b1983 100644
@@ -1099,7 +1099,9 @@ do_deploy() {
   fi

}

-addtask deploy after do_populate_sysroot
+# do_deploy is using files created during do_install so force it to be called +# after do_install but before do_build
+addtask deploy before do_build after do_install

# Enable use of menuconfig directly from bitbake and also within the devshell OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS TERMINFO"
--
2.17.1

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

#4 lore raw
Quoted 17 lines · Bertrand Marquis

On 19 Feb 2020, at 13:31, Bruce Ashfield <[email protected]> wrote:

On Wed, Feb 19, 2020 at 8:09 AM Bertrand Marquis
<[email protected]> wrote:

On 14 Feb 2020, at 10:17, Bertrand Marquis via Lists.Yoctoproject.Org <[email protected]> wrote:

do_deploy is using the files installed during do_install and it must be executed after it but before do_build. This is fixing SSTATE behaviour which had previously an empty scene in some cases.

Quoted 9 lines

Any chance somebody could check and ack on this ?

There's an entire update / re-work of Xen on the mailing list. I won't be merging any Xen patches until we have that sorted out.

Ok I will re-push my patch once the changes in Xen are merged then.

the patch does look fine, and I've tagged it for merging. I just wanted to get the big changes in before jiggling anything (even if it shouldn't have an impact).

Bruce

Quoted 51 lines

Cheers
Bertrand

Cheers,

Bruce

While there, it would make sense to also push this in zeus branch.

—
Bertrand Marquis

Change-Id I04b1f652c697ed0bc7e262571dd03e123ac096f6

---
recipes-extended/xen/xen.inc | 4 +++-

1 file changed, 3 insertions(+), 1 deletion(-)
recipes-extended/xen/xen.inc +3 -1
index 36ab78e..41b1983 100644
@@ -1099,7 +1099,9 @@ do_deploy() {
   fi
 }
 
-addtask deploy after do_populate_sysroot
+# do_deploy is using files created during do_install so force it to be called
+# after do_install but before do_build
+addtask deploy before do_build after do_install
 
 # Enable use of menuconfig directly from bitbake and also within the devshell

OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS TERMINFO" --
2.17.1

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
#5 lore raw
Quoted 15 lines · Bruce Ashfield
Quoted 13 lines · Bertrand Marquis

On 19 Feb 2020, at 13:31, Bruce Ashfield <[email protected]> wrote:

On Wed, Feb 19, 2020 at 8:09 AM Bertrand Marquis <[email protected]> wrote:

Quoted 6 lines · Bertrand Marquis via Lists.Yoctoproject.Org
Quoted 5 lines
Quoted 3 lines

do_deploy is using the files installed during do_install and it must be executed after it but before do_build. This is fixing SSTATE behaviour which had previously an empty scene in some cases.

Any chance somebody could check and ack on this ?

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

There's an entire update / re-work of Xen on the mailing list. I won't be merging any Xen patches until we have that sorted out.

Ok I will re-push my patch once the changes in Xen are merged then.

the patch does look fine, and I've tagged it for merging. I just wanted to get the big changes in before jiggling anything (even if it shouldn't have an impact).

Thanks for the report, Bertrand. I've taken a look at this. The addition of "before do_build" looks OK to me, and should be sufficient to address the behaviour reported about an empty scene observed in some cases -- some more details about that observation that prompted this patch, and some testing to confirm that just adding "before do_build" addition addresses it would be helpful.

I'm not convinced about the change to move it to "after do_install" though. do_populate_sysroot already runs after do_install, so no change is needed to ensure that the binaries are available by the time the deploy task runs, but more importantly I think that the deploy task should run, as it currently does, after do_populate_sysroot to ensure that the same binaries that are made available to other recipes via sysroots are also those that are deployed. Scheduling it after the do_populate_sysroot means that if the deploy task is run, the sysroot copies are also up to date.

Christopher

Quoted 29 lines
Quoted 29 lines

While there, it would make sense to also push this in zeus branch.

—
Bertrand Marquis

Change-Id I04b1f652c697ed0bc7e262571dd03e123ac096f6

---
recipes-extended/xen/xen.inc | 4 +++-

1 file changed, 3 insertions(+), 1 deletion(-)
recipes-extended/xen/xen.inc +3 -1
index 36ab78e..41b1983 100644
@@ -1099,7 +1099,9 @@ do_deploy() {
   fi
 }
 
-addtask deploy after do_populate_sysroot
+# do_deploy is using files created during do_install so force it to be called
+# after do_install but before do_build
+addtask deploy before do_build after do_install
 
 # Enable use of menuconfig directly from bitbake and also within the devshell

OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS TERMINFO" --
2.17.1

#6 lore raw

On 20 Feb 2020, at 18:41, Christopher Clark <[email protected]<mailto:[email protected]>> wrote:

On Wed, Feb 19, 2020 at 6:00 AM Bruce Ashfield <[email protected]<mailto:[email protected]>> wrote:

On Wed, Feb 19, 2020 at 8:47 AM Bertrand Marquis <[email protected]<mailto:[email protected]>> wrote:

On 19 Feb 2020, at 13:31, Bruce Ashfield <[email protected]<mailto:[email protected]>> wrote:

On Wed, Feb 19, 2020 at 8:09 AM Bertrand Marquis <[email protected]<mailto:[email protected]>> wrote:

On 14 Feb 2020, at 10:17, Bertrand Marquis via Lists.Yoctoproject.Org<http://Lists.Yoctoproject.Org> <[email protected]<mailto:[email protected]>> wrote:

do_deploy is using the files installed during do_install and it must be executed after it but before do_build. This is fixing SSTATE behaviour which had previously an empty scene in some cases.

Any chance somebody could check and ack on this ?

There's an entire update / re-work of Xen on the mailing list. I won't be merging any Xen patches until we have that sorted out.

Ok I will re-push my patch once the changes in Xen are merged then.

the patch does look fine, and I've tagged it for merging. I just wanted to get the big changes in before jiggling anything (even if it shouldn't have an impact).

Thanks for the report, Bertrand. I've taken a look at this. The addition of "before do_build" looks OK to me, and should be sufficient to address the behaviour reported about an empty scene observed in some cases -- some more details about that observation that prompted this patch, and some testing to confirm that just adding "before do_build" addition addresses it would be helpful.

A big grep in poky for “addtask deploy” is showing that most of the time this is added with:
addtask deploy before do_build after do_instal

I'm not convinced about the change to move it to "after do_install" though. do_populate_sysroot already runs after do_install, so no change is needed to ensure that the binaries are available by the time the deploy task runs, but more importantly I think that the deploy task should run, as it currently does, after do_populate_sysroot to ensure that the same binaries that are made available to other recipes via sysroots are also those that are deployed. Scheduling it after the do_populate_sysroot means that if the deploy task is run, the sysroot copies are also up to date.

The problem in doing this after do_populate_sysroot is that do_deploy is not using the populated sysroot but the result of do_install.

Bertrand

Christopher

While there, it would make sense to also push this in zeus branch.

—
Bertrand Marquis

Change-Id I04b1f652c697ed0bc7e262571dd03e123ac096f6

---
recipes-extended/xen/xen.inc | 4 +++-

1 file changed, 3 insertions(+), 1 deletion(-)
recipes-extended/xen/xen.inc +0 -0
index 36ab78e..41b1983 100644
@@ -1099,7 +1099,9 @@ do_deploy() {
  fi

}

-addtask deploy after do_populate_sysroot
+# do_deploy is using files created during do_install so force it to be called +# after do_install but before do_build
+addtask deploy before do_build after do_install

# Enable use of menuconfig directly from bitbake and also within the devshell OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS TERMINFO"
--
2.17.1

#7 lore raw
Quoted 35 lines · Bertrand Marquis
Quoted 25 lines · Christopher Clark
Quoted 14 lines · Bruce Ashfield
Quoted 11 lines · Bertrand Marquis
Quoted 9 lines · Bruce Ashfield
Quoted 7 lines · Bertrand Marquis
Quoted 3 lines · Bertrand Marquis via Lists.Yoctoproject.Org

do_deploy is using the files installed during do_install and it must be executed after it but before do_build. This is fixing SSTATE behaviour which had previously an empty scene in some cases.

Any chance somebody could check and ack on this ?

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

There's an entire update / re-work of Xen on the mailing list. I won't be merging any Xen patches until we have that sorted out.

Ok I will re-push my patch once the changes in Xen are merged then.

the patch does look fine, and I've tagged it for merging. I just wanted to get the big changes in before jiggling anything (even if it shouldn't have an impact).

Quoted 6 lines

Thanks for the report, Bertrand. I've taken a look at this. The addition of "before do_build" looks OK to me, and should be sufficient to address the behaviour reported about an empty scene observed in some cases -- some more details about that observation that prompted this patch, and some testing to confirm that just adding "before do_build" addition addresses it would be helpful.

Quoted 2 lines

A big grep in poky for “addtask deploy” is showing that most of the time this is added with:
addtask deploy before do_build after do_instal

You're right that there are several recipes in poky that do that; but different recipes have different requirements, based on what they build. I'll explain below why the Xen recipe differs from those.

Quoted 11 lines
Quoted 9 lines

I'm not convinced about the change to move it to "after do_install" though. do_populate_sysroot already runs after do_install, so no change is needed to ensure that the binaries are available by the time the deploy task runs, but more importantly I think that the deploy task should run, as it currently does, after do_populate_sysroot to ensure that the same binaries that are made available to other recipes via sysroots are also those that are deployed. Scheduling it after the do_populate_sysroot means that if the deploy task is run, the sysroot copies are also up to date.

Quoted 1 line

The problem in doing this after do_populate_sysroot is that do_deploy is not using the populated sysroot but the result of do_install.

The current Xen recipe that is in the meta-virtualization layer builds both the hypervisor and the tools. These tools-and-hypervisor have to match version in order to function correctly. There are two separate paths for the build
products: the hypervisor binary is made available to 'deploy' and the tools are staged for installation in the image rootfs.

To ensure that the correct version of the tools have been built and staged for the rootfs to match the deployed hypervisor binary, the deploy task which makes the hypervisor binary available depends on do_populate_sysroot task that stages the built tools binaries. That's why the existing recipe has the 'addtask deploy'
statement 'after do_populate_sysroot'.

So: you are correct that do_deploy is indeed writing binaries that are the result of
do_install, but those binaries also have a runtime dependency on the correct version of the tools being staged for inclusion in the image rootfs.

For my patch series that updates the Xen recipes, it introduces separate recipes for the tools and the hypervisor, and for the new version of the series that I'm about to post here, I've updated the deploy tasks to ensure that this deploy dependency for the hypervisor on the tools being staged correctly is preserved.

thanks,

Christopher

#8 lore raw

On 24 Feb 2020, at 04:55, Christopher Clark <[email protected]<mailto:[email protected]>> wrote:

On Fri, Feb 21, 2020 at 1:08 AM Bertrand Marquis <[email protected]<mailto:[email protected]>> wrote:

On 20 Feb 2020, at 18:41, Christopher Clark <[email protected]<mailto:[email protected]>> wrote:

On Wed, Feb 19, 2020 at 6:00 AM Bruce Ashfield <[email protected]<mailto:[email protected]>> wrote:

On Wed, Feb 19, 2020 at 8:47 AM Bertrand Marquis <[email protected]<mailto:[email protected]>> wrote:

On 19 Feb 2020, at 13:31, Bruce Ashfield <[email protected]<mailto:[email protected]>> wrote:

On Wed, Feb 19, 2020 at 8:09 AM Bertrand Marquis <[email protected]<mailto:[email protected]>> wrote:

On 14 Feb 2020, at 10:17, Bertrand Marquis via Lists.Yoctoproject.Org<http://Lists.Yoctoproject.Org> <[email protected]<mailto:[email protected]>> wrote:

do_deploy is using the files installed during do_install and it must be executed after it but before do_build. This is fixing SSTATE behaviour which had previously an empty scene in some cases.

Any chance somebody could check and ack on this ?

There's an entire update / re-work of Xen on the mailing list. I won't be merging any Xen patches until we have that sorted out.

Ok I will re-push my patch once the changes in Xen are merged then.

the patch does look fine, and I've tagged it for merging. I just wanted to get the big changes in before jiggling anything (even if it shouldn't have an impact).

Thanks for the report, Bertrand. I've taken a look at this. The addition of "before do_build" looks OK to me, and should be sufficient to address the behaviour reported about an empty scene observed in some cases -- some more details about that observation that prompted this patch, and some testing to confirm that just adding "before do_build" addition addresses it would be helpful.

A big grep in poky for “addtask deploy” is showing that most of the time this is added with:
addtask deploy before do_build after do_instal

You're right that there are several recipes in poky that do that; but different recipes have different requirements, based on what they build. I'll explain below why the Xen recipe differs from those.

I'm not convinced about the change to move it to "after do_install" though. do_populate_sysroot already runs after do_install, so no change is needed to ensure that the binaries are available by the time the deploy task runs, but more importantly I think that the deploy task should run, as it currently does, after do_populate_sysroot to ensure that the same binaries that are made available to other recipes via sysroots are also those that are deployed. Scheduling it after the do_populate_sysroot means that if the deploy task is run, the sysroot copies are also up to date.

The problem in doing this after do_populate_sysroot is that do_deploy is not using the populated sysroot but the result of do_install.

The current Xen recipe that is in the meta-virtualization layer builds both the hypervisor and the tools. These tools-and-hypervisor have to match version in order to function correctly. There are two separate paths for the build
products: the hypervisor binary is made available to 'deploy' and the tools are staged for installation in the image rootfs.

To ensure that the correct version of the tools have been built and staged for the rootfs to match the deployed hypervisor binary, the deploy task which makes the hypervisor binary available depends on do_populate_sysroot task that stages the built tools binaries. That's why the existing recipe has the 'addtask deploy'
statement 'after do_populate_sysroot'.

So: you are correct that do_deploy is indeed writing binaries that are the result of
do_install, but those binaries also have a runtime dependency on the correct version of the tools being staged for inclusion in the image rootfs.

For my patch series that updates the Xen recipes, it introduces separate recipes for the tools and the hypervisor, and for the new version of the series that I'm about to post here, I've updated the deploy tasks to ensure that this deploy dependency for the hypervisor on the tools being staged correctly is preserved.

Thanks for the explanations.
I will wait for your patch to be merged to test this again.

Bertrand