pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Bash patches format



pkgsrc (for NetBSD and other systems) has no listed bash maintainer, so ...
(and please understand that I in no way speak for pkgsrc or NetBSD here).

As long as patch(1) can handle the format, which form (context, unified, ...)
patches are released in makes no difference at all.

pkgsrc defaults to -p0 but can easily handle -p1 (or other) if required, though
ideally all distributed (as distinct from pkgsrc added) patches for one package
should use the same, but in general what would be preferred (I think) is for the
patch format to be unchanged from what is currently used.   What is there
works, and requires no updating (besides incorporating new patches as
they are released).

For the general question of which diff format is better, NetBSD (and pkgsrc)
generally prefer unified diffs - but when they are just used as patch fodder
it really makes no difference.   When they are read by humans which is
better depends entirely upon the nature of the change - for simple intra
line changes (altering a < to <= or > for example, or changing sizeof ptr
to sizeof *ptr a unified diff usually makes the change much easier to spot.
On the other hand, when an algorithm change in a function causes
changes every few lines through the function (some lines change, others
don't) unravelling what was there before, and what is there now, from a
unified diff can be more effort than it is worth, whereas a context diff will
usually simply show all that was there (with the lines that changed marked)
and all that is there now (again, with marks on the changes) so one can
easily see the old, the new, and what was changed to convert one to the
other.

kre



Home | Main Index | Thread Index | Old Index