Skip to contentSkip to conversation

Very strange append issue

DISCUSSION Gary Thomas 3 participants 7 messages Dec 1, 2013 – Dec 2, 2013

lore
Share & tools
lore
#0 lore raw

I'm having a very strange behaviour in one of my recipes. I have two recipes which are tightly coupled. In one, the 'disk-installer', I'd like to reuse a source file from another 'installer' so that I only need to make changes in a single place (good practice). To this end, I have a structure like this (the 'installer' recipe is in another layer):

meta-mytarget/packages/misc/

├── disk-installer_0.0.bb
├── installer
│   └── mytarget
│       ├── 6x_bootscript.txt -> ../../../../recipes-bsp/u-boot/u-boot-script-boundary/6x_bootscript.txt
│       ├── do_install.defaults
│       ├── do_install.post
├── installer_0.0.bbappend

In the 'disk-installer' recipe, I have:
FILESEXTRAPATHS_prepend := "${THISDIR}/installer:"
so that 'disk-installer' can pick up (share) 'do_install.defaults' That part works fine. The problem is that there is a 'do_install_append()' fragment in 'installer_0.0.bbappend' that is being attached to the 'do_install()' of 'disk-installer_0.0.bb'!

Here's what I mean - from 'disk-installer_0.0.bb':

do_install() {
    # Copy images for fully recoverable image
    MAC_ADDR=ignored . ${WORKDIR}/do_install.defaults
    for f in ${KERNEL} ${ROOTFS} ${UBOOT}; do
      if [ -e ${DEPLOY_DIR_IMAGE}/`basename $f` ]; then
        install -d ${D}/`dirname $f`
        cp -L ${DEPLOY_DIR_IMAGE}/`basename $f` ${D}/`dirname $f`
      fi
    done
}

and from 'installer_0.0.bbappend':

do_install_append() {
    # Additional installation steps
    install -m 0755 ${WORKDIR}/do_install.post ${D}/etc/do_install.post
    mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "U-Boot script" -d ${WORKDIR}/6x_bootscript.txt ${D}/etc/6x_bootscript
}

The 'installer' bit makes no sense for the 'disk-installer' recipe and yet when this package is built, I get this in 'run.do_install':

do_install() {
    # Copy images for fully recoverable image
    MAC_ADDR=ignored . /local/p8301_new/tmp/work/mytarget-amltd-linux-gnueabi/disk-installer/0.0-r0/do_install.defaults
    for f in ${KERNEL} ${ROOTFS} ${UBOOT}; do
      if [ -e /local/p8301_new/tmp/deploy/images/mytarget/`basename $f` ]; then
        install -d /local/p8301_new/tmp/work/mytarget-amltd-linux-gnueabi/disk-installer/0.0-r0/image/`dirname $f`
        cp -L /local/p8301_new/tmp/deploy/images/mytarget/`basename $f` /local/p8301_new/tmp/work/mytarget-amltd-linux-gnueabi/disk-installer/0.0-r0/image/`dirname $f`
      fi
    done
    # Additional installation steps
    install -m 0755 /local/p8301_new/tmp/work/mytarget-amltd-linux-gnueabi/disk-installer/0.0-r0/do_install.post 

/local/p8301_new/tmp/work/mytarget-amltd-linux-gnueabi/disk-installer/0.0-r0/image/etc/do_install.post
mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "U-Boot script" -d /local/p8301_new/tmp/work/mytarget-amltd-linux-gnueabi/disk-installer/0.0-r0/6x_bootscript.txt
/local/p8301_new/tmp/work/mytarget-amltd-linux-gnueabi/disk-installer/0.0-r0/image/etc/6x_bootscript

}

I can see by the copied comment (#) lines that this fragment is coming exactly from 'installer_0.0.bbappend'

This looks totally wrong to me. Am I missing something (and it should work this way)??

The complete recipes and fragments are attached in case my explanation is a bit confusing.

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

DESCRIPTION = "Additional setup for self-contained disk based installer" SECTION = "base"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 " FILESEXTRAPATHS_prepend := "${THISDIR}/installer:"

# These files get dragged in by this process DEPENDS += "amltd-console-image linux-boundary u-boot-fslc"

# Pick up defaults used by network installer

SRC_URI += " \
            file://do_install.defaults \

"

S = "${WORKDIR}"

PACKAGE_ARCH = "${MACHINE_ARCH}"

do_install() {
    # Copy images for fully recoverable image
    MAC_ADDR=ignored . ${WORKDIR}/do_install.defaults
    for f in ${KERNEL} ${ROOTFS} ${UBOOT}; do
      if [ -e ${DEPLOY_DIR_IMAGE}/`basename $f` ]; then
        install -d ${D}/`dirname $f`
        cp -L ${DEPLOY_DIR_IMAGE}/`basename $f` ${D}/`dirname $f`
      fi
    done
}

FILES_${PN} += "/local"

#
# Just tell BitBake where to find my component files #
FILESEXTRAPATHS_prepend := "${THISDIR}/installer:"

SRC_URI += " \
            file://do_install.post \
	    file://6x_bootscript.txt \

"

COMPATIBLE_MACHINE = "${MACHINE}"

do_install_append() {
    # Additional installation steps
    install -m 0755 ${WORKDIR}/do_install.post ${D}/etc/do_install.post            
    mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "U-Boot script" -d ${WORKDIR}/6x_bootscript.txt ${D}/etc/6x_bootscript
}
#1 lore raw
Quoted 6 lines · Gary Thomas

I can see by the copied comment (#) lines that this fragment is coming exactly from 'installer_0.0.bbappend'

This looks totally wrong to me. Am I missing something (and it should work this way)??

are you on master? a 'somehow' similar issue (e.g. problems with .bbappends) was reported on the list earlier this week:

http://www.mail-archive.com/[email protected]/msg16836.html

#2 lore raw
Quoted 6 lines · Nicolas Dechesne

On Sun, Dec 1, 2013 at 3:01 PM, Gary Thomas <[email protected] <mailto:[email protected]>> wrote:

I can see by the copied comment (#) lines that this fragment is coming exactly from 'installer_0.0.bbappend'

Quoted 7 lines

This looks totally wrong to me. Am I missing something (and it should work this way)??

are you on master? a 'somehow' similar issue (e.g. problems with .bbappends) was reported on the list earlier this week:

http://www.mail-archive.com/[email protected]/msg16836.html

Yes, I am using master: 937663bdeca6d6479e0db2a9578588b1aa20222c

At least I am not hallucinating!

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#3 lore raw
Quoted 4 lines · Gary Thomas

Yes, I am using master: 937663bdeca6d6479e0db2a9578588b1aa20222c

At least I am not hallucinating!

can you try to revert the same commit as in the other thread?

commit 381d5920188398bc53b2454843054c8690bca243

Author: Saul Wold <[email protected]>
Date:   Thu Nov 21 09:50:41 2013 -0800

bitbake: cooker: add support for using % as a wildcard in bbappend
filename

#4 lore raw
Quoted 8 lines · Nicolas Dechesne

On Sun, Dec 1, 2013 at 3:50 PM, Gary Thomas <[email protected] <mailto:[email protected]>> wrote:

Yes, I am using master: 937663bdeca6d6479e0db2a9578588__b1aa20222c

At least I am not hallucinating!

Quoted 8 lines

can you try to revert the same commit as in the other thread?

commit 381d5920188398bc53b2454843054c8690bca243

Author: Saul Wold <[email protected] <mailto:[email protected]>>
Date:   Thu Nov 21 09:50:41 2013 -0800

bitbake: cooker: add support for using % as a wildcard in bbappend filename

Reverting that change does eliminate my problem.

Thanks

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#5 lore raw

Hi Gary,

Just a heads up. This issue should now be resolved in the current master of poky. A patch went into bitbake to fix up the double appending of bbappends.

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=f91a3f46a1ee586e330be0868e8fbc4d2e78d361

Regards,
Nathan

Quoted 41 lines

-----Original Message-----
From: [email protected] [mailto:yocto- [email protected]] On Behalf Of Gary Thomas
Sent: Monday, December 02, 2013 1:20 AM
To: Nicolas Dechesne
Cc: Yocto Project
Subject: Re: [yocto] Very strange append issue

Quoted 2 lines · Nicolas Dechesne

On Sun, Dec 1, 2013 at 3:50 PM, Gary Thomas <[email protected]

Quoted 6 lines · <mailto:[email protected]>> wrote:

Yes, I am using master: 937663bdeca6d6479e0db2a9578588__b1aa20222c

At least I am not hallucinating!

Quoted 7 lines

can you try to revert the same commit as in the other thread?

commit 381d5920188398bc53b2454843054c8690bca243

Author: Saul Wold <[email protected] <mailto:[email protected]>>
Date:   Thu Nov 21 09:50:41 2013 -0800

bitbake: cooker: add support for using % as a wildcard in bbappend

filename

Quoted 1 line

Reverting that change does eliminate my problem.

Thanks

--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

#6 lore raw
Quoted 5 lines · Nathan Rossi

Hi Gary,

Just a heads up. This issue should now be resolved in the current master of poky. A patch went into bitbake to fix up the double appending of bbappends.

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=f91a3f46a1ee586e330be0868e8fbc4d2e78d361

Confirmed - the problem is fixed in master fabdf2f57a8e0ebe8ab7e82f92f3b298e113fcc0 (presumably by the mentioned change)

Thanks

Quoted 48 lines
Quoted 32 lines

-----Original Message-----
From: [email protected] [mailto:yocto- [email protected]] On Behalf Of Gary Thomas
Sent: Monday, December 02, 2013 1:20 AM
To: Nicolas Dechesne
Cc: Yocto Project
Subject: Re: [yocto] Very strange append issue

Quoted 2 lines · Nicolas Dechesne

On Sun, Dec 1, 2013 at 3:50 PM, Gary Thomas <[email protected]

Quoted 6 lines · <mailto:[email protected]>> wrote:

Yes, I am using master: 937663bdeca6d6479e0db2a9578588__b1aa20222c

At least I am not hallucinating!

Quoted 7 lines

can you try to revert the same commit as in the other thread?

commit 381d5920188398bc53b2454843054c8690bca243

Author: Saul Wold <[email protected] <mailto:[email protected]>>
Date:   Thu Nov 21 09:50:41 2013 -0800

bitbake: cooker: add support for using % as a wildcard in bbappend

filename

Quoted 1 line

Reverting that change does eliminate my problem.

Thanks

Quoted 9 lines

--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------