meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
sw:yocto:bitbake:operators [2022/01/12 15:55] – created niziaksw:yocto:bitbake:operators [2022/09/09 12:43] (current) niziak
Line 11: Line 11:
 Rethink usage of ''+='' and similar in local.conf. Example: Rethink usage of ''+='' and similar in local.conf. Example:
   * If ''+='' is parsed before ''?='', the latter will be omitted.   * If ''+='' is parsed before ''?='', the latter will be omitted.
-  * **Solution**: use ''_append'' to unconditionally appends a value.+  * **Solution**: use ''_append'' to unconditionally appends a value (but add space before value). 
 + 
 +====== SRC_URI_append ====== 
 + 
 +When multiple ''.bbappend''s adds patches, order of patching is wrong. 
 + 
 +poky/meta/classes/patch.bbclass 
 +<code python> 
 +def src_patches(d, all=False, expand=True): 
 +    import oe.patch 
 +    return oe.patch.src_patches(d, all, expand) 
 +</code> 
 + 
 +poky/meta/lib/oe/patch.py 
 +<code python> 
 +def src_patches(d, all=False, expand=True): 
 +    fetch = bb.fetch2.Fetch([], d) 
 +    patches = [] 
 +    sources = [] 
 +    for url in fetch.urls: 
 +        local = patch_path(url, fetch, workdir, expand) 
 +        if not local: 
 +            if all: 
 +                local = fetch.localpath(url) 
 +                sources.append(local) 
 +            continue 
 +... 
 +        localurl = bb.fetch.encodeurl(('file', '', local, '', '', patchparm)) 
 +        patches.append(localurl) 
 +     
 +    if all: 
 +        return sources 
 + 
 +    return patches 
 +</code> 
 + 
 +