Просмотр исходного кода

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

Wichert Akkerman лет назад: 25
Родитель
Сommit
0743cbf618
3 измененных файлов с 12 добавлено и 1 удалено
  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>
 
   * doc/fr/Makefile.in: add more files

+ 2 - 1
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 <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[ \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");
     }