From: Wichert Akkerman Date: Fri, 9 Mar 2001 18:40:25 +0000 (+0000) Subject: Change dpkg-gencontrol to fix comma-related syntax errors after processing substvars X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0743cbf618ad66c5518f7311ab84bbf7aabcb22f;p=dpkg Change dpkg-gencontrol to fix comma-related syntax errors after processing substvars --- diff --git a/ChangeLog b/ChangeLog index b3cf661c..12dd8cac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Mar 9 19:30:22 CET 2001 Wichert Akkerman + + * scripts/controllib.pl: change outputclose to deal with comma-related + syntax errors after processing substvars + Mon Mar 5 16:34:55 CET 2001 Wichert Akkerman * doc/fr/Makefile.in: add more files diff --git a/debian/changelog b/debian/changelog index c8a7c42a..951a6a25 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,5 @@ dpkg (1.9.0) unstable; urgency=low - * The Copenhagen release * Things should mostly work OpenBSD 2.8 as well now * Removed all --smallmem code, as smallmem and largemem now actually use about the same amount of memory, and largemem is faster. Both @@ -53,6 +52,8 @@ dpkg (1.9.0) unstable; urgency=low * Mark last argument in dpkg-scanpackages usage info as optional. Closes: Bug#86658 * Fix formatting error in dpkg-source.1. Closes: Bug#82723 + * Change dpkg-gencontrol to fix comma-related syntax errors after + processing substvars -- Wichert Akkerman UNRELEASED diff --git a/scripts/controllib.pl b/scripts/controllib.pl index bb88453a..b034e10d 100755 --- a/scripts/controllib.pl +++ b/scripts/controllib.pl @@ -121,6 +121,11 @@ sub outputclose { $v =~ m/\n\S/ && &internerr("field $f has newline then non whitespace >$v<"); $v =~ m/\n[ \t]*\n/ && &internerr("field $f has blank lines >$v<"); $v =~ m/\n$/ && &internerr("field $f has trailing newline >$v<"); + if ($dosubstvars) { + $v =~ s/,[\s,]*,/,/g; + $v =~ s/^\s*,\s*//; + $v =~ s/\s*,\s*$//; + } $v =~ s/\$\{\}/\$/g; print("$f: $v\n") || &syserr("write error on control data"); }