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
diff -ur pbuilder-0.199+nmu1/pbuilder-satisfydepends-funcs pbuilder-0.199+nmu3/pbuilder-satisfydepends-funcs --- pbuilder-0.199+nmu1/pbuilder-satisfydepends-funcs 2010-11-14 17:04:19.000000000 +0200 +++ pbuilder-0.199+nmu3/pbuilder-satisfydepends-funcs 2010-12-24 00:25:42.000000000 +0200 @@ -53,7 +53,8 @@ get_source_control_field() { local field="$1" - sed -n -e "s/^$field://i" -e ' + sed -e '/^#/d' "$DEBIAN_CONTROL" | + sed -n -e '1 { /^$/ d }' -e "s/^$field://i" -e ' t store /^-----BEGIN PGP SIGNED MESSAGE-----$/ { : pgploop @@ -91,8 +92,7 @@ # normalize space at beginning and end of line s/^ *// s/ *$// -p' \ - "$DEBIAN_CONTROL" +p' } get_build_deps() {