Re: [dev] [dmenu] versioning and patching

From: Boruch Baum <boruch_baum_AT_gmx.com>
Date: Tue, 15 Mar 2016 04:14:25 -0400

On 03/15/2016 03:02 AM, Martin K├╝hne wrote:
> how do you want to tell what patches have been applied? setting up the infrastructure for that would be ridiculously complex, since the codebase is anything but luxury in that regard and neither is the build tools that are used.
> ffs, we use patch and make here, please tell me how are unified diffs supposed to extend an array of array of char to incrementally record what patches have been applied?
>
> cheers!
> mar77i
>
How about this: ask each patched feature to add one line of code at the
main level to append its description to a single suckless.org defined
version_string variable, conceptually:

version_string = version_string + newline +
my_patch_description_with_version

The vanilla version of dmenu (and other suckless tools) would add a
uniform print function in response to a uniform command line parameter
that would print the variable version_string and exit with a success
exit code.

A patched version of source with three patches would conceptually look
like this:

* original code
* version_string defined
PATCH3: version_string modified
PATCH2: version_string modified
PATCH1: version_string modified
* version print function defined
* more original code
PATCH3: content of patch
PATCH2: content of patch
PATCH1: content of patch

The patches are listed in reverse sequence order because that's what
diff would come up with, anchoring the patch to original code.

The definition and modification of the version_string need not be source
code, but could be compile time macros.

-- 
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0
Received on Tue Mar 15 2016 - 09:14:25 CET

This archive was generated by hypermail 2.3.0 : Tue Mar 15 2016 - 09:24:10 CET