tech-pkg archive

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

Re: suggested pkglint change: error on missing comment for patch



On Sat, Jan 03, 2009 at 07:39:28PM +0100, Thomas Klausner wrote:
 > I'd like pkglint to report errors from now on if a patch doesn't have
 > a comment.
 > 
 > The comment should be one of:
 > . upstream bugtracker link for bug report associated with this patch
 > . upstream scm link, if patch is from (newer) upstream
 > . comment explaining why this patch is needed for portability but not
 >   fed upstream

While this is in general a good idea, I have some reservations.

Most packages probably don't have formal upstream bugtrackers. So I
don't think you can enforce anything more than "some text"; maybe
that's enough to accomplish something useful, maybe not.

Plus as things stand you need one comment per patch hunk, not one
comment per file, because unrelated changes to the same source file go
into the same patch file.

Also, it's probably better not to introduce any new barriers to fixing
broken packages. We already regularly have broken packages sit around
for months. Even though theoretically everything is supposed to be
filed upstream, in practice sending patches upstream for some random
package is rarely completely trivial. I'm worried that the net result
will be that needed patches don't get done at all and that more
packages will stay broken longer.

I'm assuming that it's better to have working packages with
unpropagated patches than broken packages, particularly for cases
where upstream is hard to reach or unresponsive. But I think that's a
reasonable assumption.

I suspect what we really want, if we could get it, would be a tracking
system of some kind so we can keep track of which patches have been
sent upstream, and, more to the point, easily find ones that we know
haven't been. Then getting patches filed properly becomes separable
from doing the fixes and it's just another batch of to-do items.

I don't think this is currently practical, because it really requires
keeping track of patches by changeset to avoid getting hopelessly
tangled. I guess a start would be to have pkglint enforce some basic
syntax for an upstream-handling comment, like /^Upstream:/, so we can
start collecting the data right away.

Hrm.

Have we considered keeping the upstream bug report URL or email in the
package makefile? That alone would make it a lot more likely for
patches to get filed...

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index