[OE-core] why would a recipe have both do_install() and do_install_append()?

Khem Raj raj.khem at gmail.com
Wed Jul 4 06:32:32 UTC 2012


On Tue, Jul 3, 2012 at 7:22 PM, Robert P. J. Day <rpjday at crashcourse.ca> wrote:
>
>   i'm probably just misreading something, but what is the point of a
> recipe having both a do_install() and do_install_append() function?
> for example, here's part of e2fsprogs_1.42.1.bb:
>
> do_install () {
>         oe_runmake 'DESTDIR=${D}' install
>         oe_runmake 'DESTDIR=${D}' install-libs
>         # We use blkid from util-linux now so remove from here
>         rm -f ${D}${base_libdir}/libblkid*
>         rm -rf ${D}${includedir}/blkid
>         rm -f ${D}${base_libdir}/pkgconfig/blkid.pc
> }
>
> do_install_append () {
>         # e2initrd_helper and the pkgconfig files belong in libdir
>         if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
>                 install -d ${D}${libdir}
>                 mv ${D}${base_libdir}/e2initrd_helper ${D}${libdir}
>                 mv ${D}${base_libdir}/pkgconfig ${D}${libdir}
>         fi
> }
>
>   how does that differ from simply defining a single do_install()
> routine?  i'm willing for this to be a dumb question.

it does not. I think it could be arguably done in same do_install
but it does have some logical separation where the append operation is
moving files from /lib to /usr/lib

in theory another use of it is that you can override do_install_append
in a .bbappend file
and still reuse the do_install. Suppose you do not want to move the
files and are
happy with default location
>
> rday
>
> --
>
> ========================================================================
> Robert P. J. Day                                 Ottawa, Ontario, CANADA
>                         http://crashcourse.ca
>
> Twitter:                                       http://twitter.com/rpjday
> LinkedIn:                               http://ca.linkedin.com/in/rpjday
> ========================================================================
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core




More information about the Openembedded-core mailing list