Bug 1324

Summary: Can't add to base files
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Gary Thomas <gary>
Component: meta-yoctoAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Low CC: poky.bs.watcher, poky.watcher, sgw
Version: unspecified   
Target Milestone: 1.1   
Hardware: x86   
OS: Multiple   
Whiteboard: Patch to bitbake docs out for review
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Attachments:
Description Flags
Sample .bbappend script
none
Working recipe fragment none

Description Gary Thomas 2011-08-03 08:27:47 UTC
I'd like to write a .bbappend recipe which adds some files to the base-files package.  A sample version, tuned for the beagleboard target, is attached.

Problems:
* If SRC_URI has any qualifications, e.g. SRC_URI_beagleboard_append, then the main recipe fails because it's files can't be found.
* The do_install step also seems to get royally confused.

How to duplicate.
* Add the attached .bbappend to your layer, e.g. 
    .../recipes-core/base-files/base-files_3.0.14.bbappend
* Add a simple file (bb_script) 
    .../recipes-core/base-files/base-files-3.0.14/beagleboard/bb_script
Comment 1 Gary Thomas 2011-08-03 08:29:14 UTC
Created attachment 199 [details]
Sample .bbappend script

Use this recipe chunk as a starting point to duplicate the issue.
Comment 2 Gary Thomas 2011-08-03 10:14:31 UTC
More investigation shows that while
  SRC_URI_target_append = "..."
sort of works, it really should be written
  SRC_URI_append_target = "..."

Similarly for the do_install() step

Perhaps this sort of error could be pointed out by the bitbake parser?
Comment 3 Gary Thomas 2011-08-03 10:16:23 UTC
Created attachment 200 [details]
Working recipe fragment

This .bbappend fragment works properly, documenting how this can be used.
Comment 4 Saul Wold 2011-08-04 15:18:53 UTC
So is this now a documentation issue, or is there still a problem here?
Comment 5 Gary Thomas 2011-08-04 16:09:24 UTC
(In reply to comment #4)
> So is this now a documentation issue, or is there still a problem here?

The problem was all mine, albeit just a misunderstanding.

I think the documentation can be improved as there is virtually nothing on how to use _append and/or _QUALIFIER.  I looked in all the Yocto documentation, as well as the bitbake docs.  It wasn't obvious to me that 
  SRC_URI_machine_append = "..."
was different from
  SRC_URI_append_machine = "..."
and also different from
  SRC_URI_machine += " ..."
or even
  SRC_URI += " ..."
Each yielded different, mostly confusing, results with only
  SRC_URI_append_machine = "..."
working correctly.
Comment 6 Richard Purdie 2011-08-12 01:59:28 UTC
This patch adds further documentation to the bitbake manual: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=6697ce28851121fa570b93949b82a36c322e4014