Hi,
I am trying to use a bbappend file to patch a file in $WORKDIR. To my 
understanding, the native Yocto patching process only works for patching files 
in $S.
I have come up with a solution:

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI_append =" file://inputrc.ptch"
do_patch_append () {
    cmd="patch <inputrc.ptch"
    (exitstatus, output) = oe.utils.getstatusoutput(cmd)
    if exitstatus != 0:
       raise bb.process.CmdError(cmd, output)
    return output
}

It does work. But I think this is line is not very elegant: cmd="patch 
<inputrc.ptch". Using devshell, I have confirmed that the "patch" program being 
executed is the one from the Yocto environment ($BUILDDIR/tmp-glibc/hosttools), 
not the build host. But I still suspect there is a better way. Any suggestions?

Regards,
Jeff
-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to