Skip to contentSkip to conversation

patches can be either ".patch" or ".diff" files, yes?

DISCUSSION Robert P. J. Day 3 participants 5 messages Jul 18, 2014 – Jul 19, 2014

lore
Share & tools
lore
#0 lore raw

not sure where i saw this recently (i'll track it down), but some OE
or yocto doc claimed that patch files *must* be suffixed with ".patch". i'm pretty sure it can be either .patch or .diff, correct? as in, it's perfectly valid to do this in a .bbappend file:

     SRC_URI += "file://0001-first-change.patch"
     SRC_URI += "file://0002-first-change.patch"
     SRC_URI += "file://0003-first-change.diff"

as long as the filenames match, of course. yes?

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#1 lore raw
Quoted 10 lines · Robert P. J. Day

not sure where i saw this recently (i'll track it down), but some OE
or yocto doc claimed that patch files *must* be suffixed with ".patch". i'm pretty sure it can be either .patch or .diff, correct? as in, it's perfectly valid to do this in a .bbappend file:

     SRC_URI += "file://0001-first-change.patch"
     SRC_URI += "file://0002-first-change.patch"
     SRC_URI += "file://0003-first-change.diff"

as long as the filenames match, of course. yes?

For a file to be handled automatically as a patch it must be .diff or .patch, and it appears that it can be optionally compressed (identifying extensions being .Z .gz .bz2), so foo.patch and bar.diff.gz are both automatically applied patches.

Ross

#2 lore raw
Quoted 10 lines · Ross
Quoted 9 lines · Robert P. J. Day

not sure where i saw this recently (i'll track it down), but some OE
or yocto doc claimed that patch files *must* be suffixed with ".patch". i'm pretty sure it can be either .patch or .diff, correct? as in, it's perfectly valid to do this in a .bbappend file:

     SRC_URI += "file://0001-first-change.patch"
     SRC_URI += "file://0002-first-change.patch"
     SRC_URI += "file://0003-first-change.diff"
Quoted 6 lines
Quoted 1 line

as long as the filenames match, of course. yes?

For a file to be handled automatically as a patch it must be .diff or .patch, and it appears that it can be optionally compressed (identifying extensions being .Z .gz .bz2), so foo.patch and bar.diff.gz are both automatically applied patches.

quite so, i just noticed that in patch.bbclass, good to know.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#3 lore raw
Quoted 8 lines · Robert P. J. Day
Quoted 5 lines · Ross
Quoted 4 lines · Robert P. J. Day

not sure where i saw this recently (i'll track it down), but some OE
or yocto doc claimed that patch files *must* be suffixed with ".patch". i'm pretty sure it can be either .patch or .diff, correct? as in, it's perfectly valid to do this in a .bbappend file:

Also remember that as Ross says ('*automatically* applied as a patch'), it's not a must, you can opt-in to patch application with ;apply=yes if the filename doesn't match the expected extensions.

Signature · 5 lines
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
#4 lore raw
Quoted 11 lines · Christopher Larson

On Fri, Jul 18, 2014 at 2:26 PM, Robert P. J. Day <[email protected]> wrote:
On Fri, 18 Jul 2014, Burton, Ross wrote:

> On 18 July 2014 19:58, Robert P. J. Day <[email protected]> wrote:
> >  not sure where i saw this recently (i'll track it down), but some OE > > or yocto doc claimed that patch files *must* be suffixed with > > ".patch". i'm pretty sure it can be either .patch or .diff, correct? > > as in, it's perfectly valid to do this in a .bbappend file:

Quoted 3 lines

Also remember that as Ross says ('*automatically* applied as a patch'), it's not a must, you can opt-in to patch application with ;apply=yes if the filename doesn't match the expected extensions.

ah, that was a detail of which i was unaware -- that "apply=yes" was
meant for applying patches of any arbitrary filename. of course, that suggests that there are some superfluous uses here and there in oe-core, such as:

recipes-graphics/xorg-proto/calibrateproto_git.bb: file://fix.patch;apply=yes"
recipes-graphics/libxsettings-client/libxsettings-client_0.10.bb: file://link-x11.patch;apply=yes \
recipes-sato/leafpad/leafpad_0.8.18.1.bb:SRC_URI_append_poky = " file://owl-menu.patch;apply=yes "
recipes-sato/settings-daemon/settings-daemon_git.bb: file://addsoundkeys.patch;apply=yes \

no harm, just unnecessary.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================