All of lore.kernel.org
 help / color / mirror / Atom feed
* Clarifying install vs deploy
@ 2020-02-10 10:08 Oliver Westermann
  2020-02-10 10:20 ` [yocto] " Nicolas Dechesne
  0 siblings, 1 reply; 3+ messages in thread
From: Oliver Westermann @ 2020-02-10 10:08 UTC (permalink / raw)
  To: yocto

I was asked by a colleague for the difference between do_deploy and do_install, which I both used mostly by checking similar recipes and copying their methods, but now I'm having some questions as well. The Yocto dev manual doesn't list deploy at all, so my assumption is that why do_install is the default, do_deploy is used to extend some functionality.

So my understanding for "do_install" is that it should copy the files build and provided (in ${B/S}) into ${D}, where they will be picked up by the mechanism used to create RPMs. So everything I want to end up in my rootfs needs to be installed in the correct location (as in ${D} equals the / folder of my rootfs).

Do_deploy however is documented in the reference manual as " Writes output files that are to be deployed to ${DEPLOY_DIR_IMAGE}. The task runs with the current working directory set to ${B}.", which sounds pretty much like what I described above. So how is this different from do_install, other than it seems to me that do_deploy uses the extra temporary dir ${DEPLOYDIR} (without an underscore)?

So is there any guidance when and what for to use either? 

Thanks, Olli

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

* Re: [yocto] Clarifying install vs deploy
  2020-02-10 10:08 Clarifying install vs deploy Oliver Westermann
@ 2020-02-10 10:20 ` Nicolas Dechesne
  2020-02-10 10:30   ` [EXTERNAL] " Oliver Westermann
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Dechesne @ 2020-02-10 10:20 UTC (permalink / raw)
  To: Oliver Westermann; +Cc: yocto

On Mon, Feb 10, 2020 at 11:08 AM Oliver Westermann
<oliver.westermann@cognex.com> wrote:
>
> I was asked by a colleague for the difference between do_deploy and do_install, which I both used mostly by checking similar recipes and copying their methods, but now I'm having some questions as well. The Yocto dev manual doesn't list deploy at all, so my assumption is that why do_install is the default, do_deploy is used to extend some functionality.
>
> So my understanding for "do_install" is that it should copy the files build and provided (in ${B/S}) into ${D}, where they will be picked up by the mechanism used to create RPMs. So everything I want to end up in my rootfs needs to be installed in the correct location (as in ${D} equals the / folder of my rootfs).
>
> Do_deploy however is documented in the reference manual as " Writes output files that are to be deployed to ${DEPLOY_DIR_IMAGE}. The task runs with the current working directory set to ${B}.", which sounds pretty much like what I described above. So how is this different from do_install, other than it seems to me that do_deploy uses the extra temporary dir ${DEPLOYDIR} (without an underscore)?
>
> So is there any guidance when and what for to use either?

you use do_install() to install any content that you need to be added
to your rootfs/image, as you said. the content of $D will end up in a
binary package (rpm, deb, or ipk), and that package might eventually
be installed into an image, which means that the content of $D will be
'added' to an image.

do_deploy() does not exist by default, you need inherit deploy class.
You use do_deploy() to 'install' files/content in $DEPLOY_DIR_IMAGE,
e.g. the same folder where your image is deployed. There is for
example a do_deploy() task for an image recipe. When you use
do_deploy() you do not create a binary package, but directly copy
content in $DEPLOY_DIR_IMAGE. You should use $DEPLOYDIR is your
recipe, which is a 'local' folder for your recipe to copy the content
you want to deploy. OE will take care of the copy from $DEPLOYDIR to
$DEPLOY_DIR_IMAGE (it's optimized to work with sstate-cache).

>
> Thanks, Olli
> 

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

* Re: [EXTERNAL] Re: [yocto] Clarifying install vs deploy
  2020-02-10 10:20 ` [yocto] " Nicolas Dechesne
@ 2020-02-10 10:30   ` Oliver Westermann
  0 siblings, 0 replies; 3+ messages in thread
From: Oliver Westermann @ 2020-02-10 10:30 UTC (permalink / raw)
  To: Nicolas Dechesne; +Cc: yocto

On Mon, Feb 10, 2020 at 11:22 AM Nicolas Dechesne <nicolas.dechesne@linaro.org> wrote:
> you use do_install() to install any content that you need to be added to your rootfs/image, as you said. the content of $D will end up in a binary package (rpm, deb, or ipk), and that package might eventually be installed into an image, which means that the content of $D will be 'added' to an image.
> 
> do_deploy() does not exist by default, you need inherit deploy class.
> You use do_deploy() to 'install' files/content in $DEPLOY_DIR_IMAGE, e.g. the same folder where your image is deployed. There is for example a do_deploy() task for an image recipe. When you use
> do_deploy() you do not create a binary package, but directly copy content in $DEPLOY_DIR_IMAGE. You should use $DEPLOYDIR is your recipe, which is a 'local' folder for your recipe to copy the content you want to deploy. OE will take care of the copy from $DEPLOYDIR to $DEPLOY_DIR_IMAGE (it's optimized to work with sstate-cache).

Thanks, that destinction makes it a lot clearer and sounds pretty clear to me. It also explains why we saw do_deploy a lot last week since we we're working with our bootloaders, which generally need to end up next to the image (same with e.g. U-Boot tools).

Best regards, Olli

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

end of thread, other threads:[~2020-02-10 10:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-10 10:08 Clarifying install vs deploy Oliver Westermann
2020-02-10 10:20 ` [yocto] " Nicolas Dechesne
2020-02-10 10:30   ` [EXTERNAL] " Oliver Westermann

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.