On Mon, Feb 10, 2020 at 11:08 AM Oliver Westermann <[email protected]> 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 >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#48326): https://lists.yoctoproject.org/g/yocto/message/48326 Mute This Topic: https://lists.yoctoproject.org/mt/71133603/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
