[Debconf-devel] Bug#754123: dpkg-preconfigure: misleading error message when apt-extracttemplates fails

Jakub Wilk jwilk at debian.org
Mon Jul 7 18:15:35 UTC 2014


Package: debconf
Version: 1.5.53

This is how dpkg-preconfigure calls apt-extracttemplates:

   if (system("apt-extracttemplates", @collect) != 0) {
           print STDERR sprintf("debconf: ".gettext("apt-extracttemplates failed: %s")."\n",$!);
   }

But system() sets $! only if the program couldn't be executed or if 
wait(2) failed. If the program could be executed, but exited with 
non-zero status, or was killed by a signal, $! would be left unmodified. 
In such case, you would be likely to see misleading error message like 
this:

debconf: apt-extracttemplates failed: Illegal seek

-- 
Jakub Wilk



More information about the Debconf-devel mailing list