Bug 15285

Summary: devtool: Generated patches do not always match source end-of-line (CRLF vs LF)
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Yoann Congal <yoann.congal>
Component: devtools / tool chainAssignee: Yoann Congal <yoann.congal>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: meta.mr.watcher, meta.watcher, randy.macleod, ross.burton
Version: unspecified   
Target Milestone: 5.0   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Yoann Congal 2023-11-17 19:56:38 UTC
When patchin projucer in meta-openembedded, I triggered this :
[meta-multimedia][PATCH] juce/projucer: Backport a fix for the compilation under recent GCC
https://lists.openembedded.org/g/openembedded-devel/message/106762
... which had to be fixed like this :
[meta-multimedia][PATCH] projucer: Refresh patch to apply cleanly
https://lists.openembedded.org/g/openembedded-devel/message/106872

Origin sources are CR-LF (Windows):
 $ file modules/juce_core/system/juce_StandardHeader.h
modules/juce_core/system/juce_StandardHeader.h: C source, ASCII text, with CRLF line terminators

My commit in the devtool workspace is still in CR-LF.

The generated patch is LF => it does not apply cleanly.
Comment 1 Yoann Congal 2023-11-22 14:16:13 UTC
Maybe in https://git.openembedded.org/openembedded-core/tree/meta/lib/oe/patch.py#n464 def extractPatches():?

Sightly related patches :
[PATCH v2 0/2] patch: reduce changes during patch refresh
https://lists.openembedded.org/g/openembedded-core/message/191105
[PATCH v2 1/2] patch: extract patches without diffstats
https://lists.openembedded.org/g/openembedded-core/message/191106
[PATCH v2 2/2] patch: extract patches with all-zero hash
https://lists.openembedded.org/g/openembedded-core/message/191107
Comment 2 Yoann Congal 2023-11-27 13:50:26 UTC
Patch sent : https://lists.openembedded.org/g/openembedded-core/message/191303