[yocto] Patching a file in $WORKDIR
Gabriele Zampieri
gabbla.malist at gmail.com
Tue Jul 16 23:13:15 PDT 2019
Hi Jeffrey,
the extension "ptch" is not treated as patchfile by Yocto (only *.diff and
*.patch). You have two options:
- Rename your patch in inputrc.patch
- Adding the apply switch:
SRC_URI_append =" file://inputrc.ptch;apply=yes"
In this way you are telling yocto that 'inputrc.ptch' is a patch file
In both cases you can remove your append.
This should be enough.
Best regards,
Gabriele
Il giorno mar 16 lug 2019 alle ore 18:44 Siegel, Jeffrey (Nokia - US/Murray
Hill) <jeffrey.siegel at nokia.com> ha scritto:
> 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 at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20190717/1289378a/attachment.html>
More information about the yocto
mailing list