All of lore.kernel.org
 help / color / mirror / Atom feed
* Very strange append issue
@ 2013-12-01 14:01 Gary Thomas
  2013-12-01 14:37 ` Nicolas Dechesne
  0 siblings, 1 reply; 7+ messages in thread
From: Gary Thomas @ 2013-12-01 14:01 UTC (permalink / raw)
  To: Yocto Project

[-- Attachment #1: Type: text/plain, Size: 3607 bytes --]

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.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

[-- Attachment #2: disk-installer_0.0.bb --]
[-- Type: text/plain, Size: 871 bytes --]

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"

[-- Attachment #3: installer_0.0.bbappend --]
[-- Type: text/plain, Size: 507 bytes --]

#
# 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
}



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

* Re: Very strange append issue
  2013-12-01 14:01 Very strange append issue Gary Thomas
@ 2013-12-01 14:37 ` Nicolas Dechesne
  2013-12-01 14:50   ` Gary Thomas
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Dechesne @ 2013-12-01 14:37 UTC (permalink / raw)
  To: Gary Thomas; +Cc: Yocto Project

[-- Attachment #1: Type: text/plain, Size: 482 bytes --]

On Sun, Dec 1, 2013 at 3:01 PM, Gary Thomas <gary@mlbassoc.com> wrote:

> 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/yocto@yoctoproject.org/msg16836.html

[-- Attachment #2: Type: text/html, Size: 1127 bytes --]

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

* Re: Very strange append issue
  2013-12-01 14:37 ` Nicolas Dechesne
@ 2013-12-01 14:50   ` Gary Thomas
  2013-12-01 14:59     ` Nicolas Dechesne
  0 siblings, 1 reply; 7+ messages in thread
From: Gary Thomas @ 2013-12-01 14:50 UTC (permalink / raw)
  To: Nicolas Dechesne; +Cc: Yocto Project

On 2013-12-01 07:37, Nicolas Dechesne wrote:
>
> On Sun, Dec 1, 2013 at 3:01 PM, Gary Thomas <gary@mlbassoc.com <mailto:gary@mlbassoc.com>> wrote:
>
>     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/yocto@yoctoproject.org/msg16836.html

Yes, I am using master: 937663bdeca6d6479e0db2a9578588b1aa20222c

At least I am not hallucinating!

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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

* Re: Very strange append issue
  2013-12-01 14:50   ` Gary Thomas
@ 2013-12-01 14:59     ` Nicolas Dechesne
  2013-12-01 15:20       ` Gary Thomas
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Dechesne @ 2013-12-01 14:59 UTC (permalink / raw)
  To: Gary Thomas; +Cc: Yocto Project

[-- Attachment #1: Type: text/plain, Size: 466 bytes --]

On Sun, Dec 1, 2013 at 3:50 PM, Gary Thomas <gary@mlbassoc.com> wrote:

> 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 <s...@linux.intel.com>
Date:   Thu Nov 21 09:50:41 2013 -0800

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

[-- Attachment #2: Type: text/html, Size: 1156 bytes --]

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

* Re: Very strange append issue
  2013-12-01 14:59     ` Nicolas Dechesne
@ 2013-12-01 15:20       ` Gary Thomas
  2013-12-02  1:02         ` Nathan Rossi
  0 siblings, 1 reply; 7+ messages in thread
From: Gary Thomas @ 2013-12-01 15:20 UTC (permalink / raw)
  To: Nicolas Dechesne; +Cc: Yocto Project

On 2013-12-01 07:59, Nicolas Dechesne wrote:
>
> On Sun, Dec 1, 2013 at 3:50 PM, Gary Thomas <gary@mlbassoc.com <mailto:gary@mlbassoc.com>> wrote:
>
>     Yes, I am using master: 937663bdeca6d6479e0db2a9578588__b1aa20222c
>
>     At least I am not hallucinating!
>
>
> can you try to revert the same commit as in the other thread?
>
> commit 381d5920188398bc53b2454843054c8690bca243
> Author: Saul Wold <s...@linux.intel.com <mailto:s...@linux.intel.com>>
> 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

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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

* Re: Very strange append issue
  2013-12-01 15:20       ` Gary Thomas
@ 2013-12-02  1:02         ` Nathan Rossi
  2013-12-02 15:00           ` Gary Thomas
  0 siblings, 1 reply; 7+ messages in thread
From: Nathan Rossi @ 2013-12-02  1:02 UTC (permalink / raw)
  To: Gary Thomas; +Cc: Yocto Project

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

> -----Original Message-----
> From: yocto-bounces@yoctoproject.org [mailto:yocto-
> bounces@yoctoproject.org] 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
> 
> On 2013-12-01 07:59, Nicolas Dechesne wrote:
> >
> > On Sun, Dec 1, 2013 at 3:50 PM, Gary Thomas <gary@mlbassoc.com
> <mailto:gary@mlbassoc.com>> wrote:
> >
> >     Yes, I am using master: 937663bdeca6d6479e0db2a9578588__b1aa20222c
> >
> >     At least I am not hallucinating!
> >
> >
> > can you try to revert the same commit as in the other thread?
> >
> > commit 381d5920188398bc53b2454843054c8690bca243
> > Author: Saul Wold <s...@linux.intel.com <mailto:s...@linux.intel.com>>
> > 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
> 
> --
> ------------------------------------------------------------
> Gary Thomas                 |  Consulting for the
> MLB Associates              |    Embedded world
> ------------------------------------------------------------
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto




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

* Re: Very strange append issue
  2013-12-02  1:02         ` Nathan Rossi
@ 2013-12-02 15:00           ` Gary Thomas
  0 siblings, 0 replies; 7+ messages in thread
From: Gary Thomas @ 2013-12-02 15:00 UTC (permalink / raw)
  To: yocto

On 2013-12-01 18:02, Nathan Rossi wrote:
> 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

>> -----Original Message-----
>> From: yocto-bounces@yoctoproject.org [mailto:yocto-
>> bounces@yoctoproject.org] 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
>>
>> On 2013-12-01 07:59, Nicolas Dechesne wrote:
>>>
>>> On Sun, Dec 1, 2013 at 3:50 PM, Gary Thomas <gary@mlbassoc.com
>> <mailto:gary@mlbassoc.com>> wrote:
>>>
>>>      Yes, I am using master: 937663bdeca6d6479e0db2a9578588__b1aa20222c
>>>
>>>      At least I am not hallucinating!
>>>
>>>
>>> can you try to revert the same commit as in the other thread?
>>>
>>> commit 381d5920188398bc53b2454843054c8690bca243
>>> Author: Saul Wold <s...@linux.intel.com <mailto:s...@linux.intel.com>>
>>> 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
>>
>> --
>> ------------------------------------------------------------
>> Gary Thomas                 |  Consulting for the
>> MLB Associates              |    Embedded world
>> ------------------------------------------------------------
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>
>
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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

end of thread, other threads:[~2013-12-02 15:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-01 14:01 Very strange append issue Gary Thomas
2013-12-01 14:37 ` Nicolas Dechesne
2013-12-01 14:50   ` Gary Thomas
2013-12-01 14:59     ` Nicolas Dechesne
2013-12-01 15:20       ` Gary Thomas
2013-12-02  1:02         ` Nathan Rossi
2013-12-02 15:00           ` Gary Thomas

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.