From a146038aef8c6e1cf0b1856a590c524f3016920a Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 13 Mar 2007 02:32:45 +0000 Subject: [PATCH] * scripts/controllib.pl (parsechangelog): Only binmode CDATA from the parent side of the opened pipe, on the child side binmode STDOUT. --- ChangeLog | 5 +++++ scripts/controllib.pl | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 74db8897..8bfaad72 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-03-13 Guillem Jover + + * scripts/controllib.pl (parsechangelog): Only binmode CDATA from the + parent side of the opened pipe, on the child side binmode STDOUT. + 2007-03-13 Guillem Jover * scripts/dpkg-shlibdeps.pl: Use new style file handler references. diff --git a/scripts/controllib.pl b/scripts/controllib.pl index f5ae4c43..b2003674 100755 --- a/scripts/controllib.pl +++ b/scripts/controllib.pl @@ -311,16 +311,19 @@ sub parsechangelog { my ($changelogfile, $changelogformat, $since) = @_; defined($c=open(CDATA,"-|")) || &syserr(_g("fork for parse changelog")); - binmode(CDATA); - if (!$c) { + if ($c) { + binmode(CDATA); + parsecdata(\*CDATA, 'L', 0, _g("parsed version of changelog")); + close(CDATA); + $? && subprocerr(_g("parse changelog")); + } else { + binmode(STDOUT); @al=($parsechangelog); push(@al,"-l$changelogfile"); push(@al, "-F$changelogformat") if defined($changelogformat); push(@al, "-v$since") if defined($since); exec(@al) || &syserr("exec parsechangelog $parsechangelog"); } - parsecdata(\*CDATA, 'L', 0, _g("parsed version of changelog")); - close(CDATA); $? && &subprocerr(_g("parse changelog")); } sub init_substvars -- 2.39.5