Bug#603881: patch breaks more then fixes

Eric Pozharski whynot at pozharski.name
Fri Dec 24 00:03:17 UTC 2010


On Thu, Dec 16, 2010 at 07:49:09PM +1100, Matthew Palmer wrote:

> The attached patch is based on Eric's, but is more Policy compliant, and
> includes a test case for added validation.  I've verified that it all works
> as intended.

And here xorg-server_2:1.7.7-10 comes.  And shows such a problem with
the patch:

	if the Field: requested has preceeding comment block consisting
	odd (no pun intended) number of lines then the requested Field:
	is skipped.

After approx 3 hours of sed massaging and hair pulling I've got to
conlclusion that the problem (if that's a problem at all) first
introduced by atk1.0 is not the leading comment block at all.  The
problem is the intermediate empty line.  Look, paragraphs of deb-control
files are separated by empty lines.  The very first paragraph of the
problematic debian/control consists of entire comment.  Thus the very
first paragraph (that should contain Source: and friends) is effectevely
void.  That brings the question: how get_source_control_field could find
anything in a void paragraph?

I believe, that leading-comment-block.panic.diff while being somewhat
sharp is the only solution for *this* problem (if that's a problem at
all) while avoiding introducing others.  Whatever else I've tried leads
to either collapsing all paragraphs in the whole thing (with repeating
fields), or still choking on the separating empty line, or skipping the
trailing Field:.  Probably (while I doubt that) falling to GNU
extensions of sed could help but I'm not sure it's worth of.  Or
re-writing the whole thing in awk.  Look, sed has no concept of state.

Close at will.

-- 
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: leading-comment-block.panic.diff
Type: text/x-diff
Size: 704 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pbuilder-maint/attachments/20101224/91e920cd/attachment.diff>


More information about the Pbuilder-maint mailing list