[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#31508: parsechangelog broken?



On second thoughts, Christian's original patch avoids the need to look
at debian/substvars if it is not needed, so could be used *in
addition* to mine.  The full patch looks like this:

--- controllib.pl.orig  Fri Jan 15 01:08:51 1999
+++ controllib.pl       Fri Jan 15 01:10:15 1999
@@ -1,3 +1,4 @@
+use POSIX qw(:errno_h);
 
 $parsechangelog= 'dpkg-parsechangelog';
 
@@ -91,7 +91,7 @@
 sub outputclose {
     my ($dosubstvars) = @_;
     for $f (keys %f) { $substvar{"F:$f"}= $f{$f}; }
-    if (length($varlistfile)) {
+    if (length($varlistfile) and $dosubstvars) {
         $varlistfile="./$varlistfile" if $varlistfile =~ m/\s/;
         if (open(SV,"< $varlistfile")) {
             while (<SV>) {
@@ -101,7 +102,7 @@
                 $substvar{$1}= $';
             }
             close(SV);
-        } elsif ($! !~ m/no such file or directory/i) {
+        } elsif ($! != ENOENT) {
             &error("unable to open substvars file $varlistfile: $!");
         }
     }


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

            Julian Gilbey             Email: J.D.Gilbey@qmw.ac.uk
       Dept of Mathematical Sciences, Queen Mary & Westfield College,
                  Mile End Road, London E1 4NS, ENGLAND
      -*- Finger jdg@goedel.maths.qmw.ac.uk for my PGP public key. -*-


Reply to: