Bug#786518: Latest dpkg-dev breaks debdiff in some locales

Guillem Jover guillem at debian.org
Fri May 22 15:14:18 UTC 2015


Control: reassign -1 devscripts
Control: retitle -1 devscripts: debdiff breaks with localized error from Dpkg::IPC

Hi!

On Fri, 2015-05-22 at 10:21:53 -0400, David Prévot wrote:
> Actually, I reproduced the issue with every package I tried to debdiff
> since dpkg-dev has been upgraded to 1.18.0 (and only noticed now that it
> is related to the locale).

> $ debdiff /var/cache/apt/archives/libdpkg-perl_1.1{7.25,8.0}_all.deb 
> [The following lists of changes regard files as different if they have
> different names, permissions or owners.]
> 
> Files in second .deb but not in first
> -------------------------------------
> -rw-r--r--  root/root   /usr/share/doc/libdpkg-perl/usertags.gz
> debdiff: erreur: wdiff -n /tmp/jVrpjzUnui/control /tmp/FU3VkiLlVM/control a produit une erreur de sortie de type 1
> 
> wdiff failed

> $ locale
> LANG=fr_FR.UTF-8

Ah, ok this is due to a fix in libdpkg-perl, which now correctly
localizes the messages, and debdiff improperly parsing the error
message instead of checking the exit status.

,---
	eval {
	    spawn(exec => ['wdiff', @opts, "$dir1/$cf", "$dir2/$cf"],
		to_string => \$wdiff,
		wait_child => 1);
	};
	if ($@ and $@ !~ /gave error exit status 1/) {
	    print "$@\n";
	    warn "wdiff failed\n";
	} else {
`---

Parsing the error message even with the C locale is prone to not work
if the message happens to change in the future. Ideally the spawn call
would use nocheck => 1, and then the check act on $?.

Thanks,
Guillem



More information about the devscripts-devel mailing list