Explorar o código

Change dpkg-gencontrol to fix comma-related syntax errors after processing substvars

Wichert Akkerman %!s(int64=25) %!d(string=hai) anos
pai
achega
0743cbf618
Modificáronse 3 ficheiros con 12 adicións e 1 borrados
  1. 5 0
      ChangeLog
  2. 2 1
      debian/changelog
  3. 5 0
      scripts/controllib.pl

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+Fri Mar  9 19:30:22 CET 2001 Wichert Akkerman <wakkerma@debian.org>
+
+  * 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 <wakkerma@debian.org>
 Mon Mar  5 16:34:55 CET 2001 Wichert Akkerman <wakkerma@debian.org>
 
 
   * doc/fr/Makefile.in: add more files
   * doc/fr/Makefile.in: add more files

+ 2 - 1
debian/changelog

@@ -1,6 +1,5 @@
 dpkg (1.9.0) unstable; urgency=low
 dpkg (1.9.0) unstable; urgency=low
 
 
-  * The Copenhagen release
   * Things should mostly work OpenBSD 2.8 as well now
   * Things should mostly work OpenBSD 2.8 as well now
   * Removed all --smallmem code, as smallmem and largemem now actually
   * Removed all --smallmem code, as smallmem and largemem now actually
     use about the same amount of memory, and largemem is faster.  Both
     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.
   * Mark last argument in dpkg-scanpackages usage info as optional.
     Closes: Bug#86658
     Closes: Bug#86658
   * Fix formatting error in dpkg-source.1. Closes: Bug#82723
   * Fix formatting error in dpkg-source.1. Closes: Bug#82723
+  * Change dpkg-gencontrol to fix comma-related syntax errors after
+    processing substvars
 
 
  -- Wichert Akkerman <wakkerma@debian.org>  UNRELEASED
  -- Wichert Akkerman <wakkerma@debian.org>  UNRELEASED
 
 

+ 5 - 0
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\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[ \t]*\n/ && &internerr("field $f has blank lines >$v<");
         $v =~ m/\n$/ && &internerr("field $f has trailing newline >$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;
         $v =~ s/\$\{\}/\$/g;
         print("$f: $v\n") || &syserr("write error on control data");
         print("$f: $v\n") || &syserr("write error on control data");
     }
     }