On Wed, Oct 12, 2011 at 12:33 PM, Mike Frysinger <vap...@gentoo.org> wrote:
> On Wednesday 12 October 2011 15:19:25 Samuli Suominen wrote:
>> On 10/12/2011 06:30 AM, Steven J Long wrote:
>> > Michał Górny wrote:
>> >> I don't think that passing multiple files to epatch actually improves
>> >> readability. Simple example:
>> >>
>> >> # bug #123456, foo, bar
>> >> epatch "${FILESDIR}"/${P}-foo.patch
>> >> # bug #234567, baz bazinga blah blah
>> >> epatch "${FILESDIR}"/${P}-baz.patch
>> >>
>> >> With multiple arguments, you can't put comments in the middle.
>> >
>> > ++ It's also a lot easier to remove the single patches when they're no
>> > longer needed.
>>
>> Removing an 'epatch foo' line is easier than 'foo \' ?  You are kidding,
>> right?
>>
>> > In the context of configuring, building and installing a
>> > package, the extra overhead is miniscule, whereas the above is *much*
>> > easier to maintain.
>>
>> Based on what argument?
>>
>> Having the comments inside the patch allows everyone, including
>> _upstreams_ straight up see what's it for and link to the bug it's
>> coming from. Where as keeping them in ebuilds makes it Gentoo specific,
>> which is not what we are about.
>
> i personally prefer:
>        epatch "${FILESDIR}"/${P}-foo.patch #12345
>        epatch "${FILESDIR}"/${P}-bar.patch #19512 #91991
>        epatch "${FILESDIR}"/${P}-fatcow.patch #19291
> because i personally like to have just the bug number there
>
> i know other people prefer to pass these all on one line:
>        epatch \
>                "${FILESDIR}"/${P}-foo.patch \
>                "${FILESDIR}"/${P}-bar.patch \
>                "${FILESDIR}"/${P}-fatcow.patch

The problem with the latter is the same problem I have w/python lists
and commas.

If I want to add a patch to the list I might forget to to add the \

epatch \
  "${FILESDIR}"/${P}-foo.patch \
  "${FILESDIR}"/${P}-last.patch # <-- Oops I forgot to add a \ here
  "${FILESDIR}"/${P}-my-new.patch

Or I delete the last patch and forget to remove the \

epatch \
  "${FILESDIR}"/${P}-foo.patch \
  "${FILESDIR}"/${P}-bar.patch \ # <-- oops again!

>
> there is no standard here (i think they're more or less equally common) and
> maintainers are free to pick what they like best.  arguing about the merits
> between the two above styles is a waste of everyone's time.  go fix some bugs
> instead you lazy wankers :P.

I enjoy wasting time :)

>
> the one thing Samuli is correct about though and largely has nothing to do
> with style is that the patch itself needs to have all the relevant
> information.  doing the following is wrong:
>        # here i explain what the patch is for #12351
>        epatch "${FILESDIR}"/${P}-bar.patch
>        (and the bar patch contains only the diff)
>
> rather than rehash why you're wrong if you do the above, please read:
>        http://dev.gentoo.org/~vapier/clean-patches
> -mike
>

Reply via email to