Bug#204827: dpkg-dev: dpkg-parsechangelog fails with _POSIX2_VERSION=200112
Package: dpkg-dev
Version: 1.10.10
Severity: normal
Tags: patch
dpkg-parsechangelog uses 'tail -40' to find the changelog format.
However, options like -COUNT to tail are obsolete, and disallowed if
_POSIX2_VERSION=200112 is set in the environment; see
http://lists.debian.org/debian-glibc-0308/msg00120.html for more
discussion and information.
A patch fixing this is attached.
Thanks,
--
Colin Watson [cjwatson@flatline.org.uk]
Index: scripts/dpkg-parsechangelog.pl
===================================================================
RCS file: /cvs/dpkg/dpkg/scripts/dpkg-parsechangelog.pl,v
retrieving revision 1.4
diff -p -u -r1.4 dpkg-parsechangelog.pl
--- scripts/dpkg-parsechangelog.pl 4 Mar 2001 14:39:06 -0000 1.4
+++ scripts/dpkg-parsechangelog.pl 10 Aug 2003 14:10:11 -0000
@@ -51,7 +51,7 @@ $changelogfile= "./$changelogfile" if $c
if (not $force and $changelogfile ne "-") {
open(STDIN,"< $changelogfile") ||
&error("cannot open $changelogfile to find format: $!");
- open(P,"tail -40 |") || die "cannot fork: $!\n";
+ open(P,"tail -n 40 |") || die "cannot fork: $!\n";
while(<P>) {
next unless m/\schangelog-format:\s+([0-9a-z]+)\W/;
$format=$1;
Reply to: