Hi Chuck,

From: Chuck Wolber <[email protected]>
Sent: Monday, September 14, 2020 12:48 PM
To: Greg Wilson-Lindberg <[email protected]>
Cc: Yocto list discussion <[email protected]>
Subject: Re: [yocto] Patching file contained in downloaded recipe

On Mon, Sep 14, 2020 at 10:50 AM Greg Wilson-Lindberg 
<[email protected]<mailto:[email protected]>> wrote:
I have a recipe that has a .service file in one of its files directories that I 
need to patch.

I haven’t been able to figure out how to specify the directory of the file that 
needs to be patched. I can’t seem to get the patch to apply to the files 
directory, do I need to specify the /lib/systemd/system directory into the 
PATCHDIR option or is there another way that would work better?

Are you patching an existing upstream recipe? Or your own recipe? In the former 
case, you would use a .bbappend recipe.

<reply>
I am patching a recipe that is included with the Yocto system that I download. 
The .system file that I need to modify is in one of the file directories that 
are part of the recipe.

I have a .bbappend recipe that is being picked up, but because the file that I 
want to patch is part of the recipe and not part of what a recipe would 
download if it were building something from source, the patch system is not 
finding it.

<reply/>

In either case, it all depends on how the service file is generated. If it is 
part of the source code, then you just create a patch against the source tree 
and reference that patch in a recipe as a SRC_URI_append. If you generate it as 
part of a build, then you would either patch the build product (less 
desirable), or patch the code that generates the service file (more desirable).

<reply>
Part of my question was, could I use the PATCHDIR option to specify the 
/lib/systemd/system/file.service file to get the patch to run against the 
‘copied’ version of the file?

Sorry for the weird “<reply>…<reply\>” blocks, I’m stuck with Outlook for email 
and I can’t figure out how to get it to indent the email I’m replying to and 
let me comment in line without indenting my replies also.

Regards, Greg
<reply\>

..Ch:W..

--
"Perfection must be reached by degrees; she requires the slow hand of time." - 
Voltaire
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#50675): https://lists.yoctoproject.org/g/yocto/message/50675
Mute This Topic: https://lists.yoctoproject.org/mt/76848145/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to