[Buildroot] RFC: package patching

Thomas De Schampheleire patrickdepinguin+buildroot at gmail.com
Thu Nov 17 13:05:47 UTC 2011


On Wed, Nov 16, 2011 at 7:03 PM, Thomas Petazzoni
<thomas.petazzoni at free-electrons.com> wrote:
> Le Wed, 16 Nov 2011 07:44:54 +0100,
> Thomas De Schampheleire <patrickdepinguin+buildroot at gmail.com> a écrit :
>
>> > As Arnout suggests, I think that most packages should just have
>> > patches whose filename do not contain the version. Only packages
>> > that support multiple versions would have subdirectories.
>>
>> I'm not sure if this is so black-and-white. If a patch backports a
>> change from 1.2.3 to 1.2.2, then IMO the patch should really be named
>> 1.2.2, even if only 1.2.2 is present in Buildroot. If it is named
>> without version, then it will also be taken along when bumping the
>> package (and possibly but not necessarily cause a patch conflict).
>> Only in cases were the change made by the patch is generic and not
>> intended for a specific version, should we remove the version from the
>> patch name.
>
> A generic patch doesn't exist, a patch is *always* for a specific
> version of a source tree. The fact that it might apply on multiple
> versions of a given package is just pure luck. Therefore, I don't see
> where the distinction between "generic patch" and a "version-specific"
> patch is.

How does a version-bumper currently go about? How is he supposed to
know whether a patch is still valid or not?

Although you are right that there is no such thing as a generic patch,
I still feel there is a conceptual difference between:
* modifications intended for all versions of a package, for example
modifications that we know will never go upstream because they are
buildroot-specific, and
* modifications which are intended for a specific version, for example
a backport of a change that was already fixed in a later version.

To remove our reliance on 'luck', I agree it may be best to add
version numbers to either type of patch. If a package has multiple
versions, the patch may simply be duplicated with separate version
numbers.

But, should we mark the difference between such patches in a different way?

Best regards,
Thomas



More information about the buildroot mailing list