Author: rra Date: 2008-03-03 06:06:59 +0100 (Mon, 03 Mar 2008) New Revision: 1232
Modified: trunk/checks/cruft trunk/debian/changelog trunk/unpack/unpack-srcpkg-l2 Log: + [RA] Remove now-unnecessary workarounds for calling File::Find with symlink starting directory. * unpack/unpack-srcpkg-l2: + [RA] Don't rely on the output format of dpkg-source to learn the source directory and create a symlink. Instead, tell dpkg-source to unpack the source directly into the unpacked directory. Discard output of dpkg-source to allow for the current version, which prints things even with -q (fixed in later versions). Thanks, Raphael Hertzog. (Closes: #468927) Modified: trunk/checks/cruft =================================================================== --- trunk/checks/cruft 2008-03-03 04:31:46 UTC (rev 1231) +++ trunk/checks/cruft 2008-03-03 05:06:59 UTC (rev 1232) @@ -125,11 +125,8 @@ $atdinbd = 1 if Dep::implies(Dep::parse($bd), Dep::parse($autotools_pkgs)); } -my $cwd = cwd; -$dir = readlink "$cwd/unpacked"; # File::Find in Perl 5.8 appears to need it - check_diffstat("diffstat"); -find(\&find_cruft, "$dir"); +find(\&find_cruft, 'unpacked'); } # </run> @@ -192,7 +189,7 @@ # "source-contains" tag. The tag isn't entirely accurate, but it's better # than creating yet a third set of tags, and this gets the severity right. sub find_cruft { - (my $name = $File::Find::name) =~ s,^\Q$dir\E/,,; + (my $name = $File::Find::name) =~ s,^(\./)?unpacked/,,; my $prefix = ($native ? "diff-contains" : "source-contains"); if (-d and not $warned{$name}) { for my $rule (@directory_checks) { Modified: trunk/debian/changelog =================================================================== --- trunk/debian/changelog 2008-03-03 04:31:46 UTC (rev 1231) +++ trunk/debian/changelog 2008-03-03 05:06:59 UTC (rev 1232) @@ -26,6 +26,8 @@ + [FL] Add hg to the list of <vcs>-control-dir tags. + [RA] In the long description of outdated-autotools-helper-file, point to autotool-dev's documentation. (Closes: #465132) + + [RA] Remove now-unnecessary workarounds for calling File::Find with + symlink starting directory. * checks/debian-readme{.desc,}: + [RA] Warn of references to /usr/doc in README.Debian. Thanks, Guillem Jover. (Closes: #465192) @@ -73,6 +75,14 @@ * reporting/templates: + [TK] Correct Lintian maintainers address in page footers. + * unpack/unpack-srcpkg-l2: + + [RA] Don't rely on the output format of dpkg-source to learn the + source directory and create a symlink. Instead, tell dpkg-source to + unpack the source directly into the unpacked directory. Discard + output of dpkg-source to allow for the current version, which prints + things even with -q (fixed in later versions). Thanks, Raphael + Hertzog. (Closes: #468927) + -- Thijs Kinkhorst <[EMAIL PROTECTED]> Tue, 19 Feb 2008 11:31:41 +0100 lintian (1.23.45) unstable; urgency=low Modified: trunk/unpack/unpack-srcpkg-l2 =================================================================== --- trunk/unpack/unpack-srcpkg-l2 2008-03-03 04:31:46 UTC (rev 1231) +++ trunk/unpack/unpack-srcpkg-l2 2008-03-03 05:06:59 UTC (rev 1232) @@ -30,31 +30,27 @@ ($#ARGV == 0) or fail("syntax: unpack-srcpkg-l2 <base-dir>"); my $base_dir = shift; -my $unpack_dir; print "N: Unpacking source package in directory $base_dir ...\n" if $verbose; -chdir($base_dir); -my $IN = FileHandle->new; -pipeline_open($IN, sub { - my $ret=exec 'dpkg-source', '-q', '-x', 'dsc'; - $ret; - }) or fail("cannot run dpkg-source: $!"); - -while (<$IN>) { - chop; - $unpack_dir = $1 - if (/^dpkg-source: extracting [^\s]+ in (\S+)/); +# We can't use spawn yet because older versions of dpkg-source print things +# out even with -q. This can be fixed to use spawn once that newer version of +# dpkg is in oldstable. +my $pid = fork; +if (not defined $pid) { + fail("cannot fork: $!"); +} elsif ($pid == 0) { + open(STDOUT, '>', '/dev/null'); + exec('dpkg-source', '-q', '-x', "$base_dir/dsc", "$base_dir/unpacked"); +} else { + waitpid($pid, 0); + unless ($? == 0) { + fail("cannot run dpkg-source: $!"); + } } -close($IN) or fail("error occured during execution of dpkg-source in $base_dir: $!"); -$unpack_dir or fail("dpkg-source didn't report unpack directory"); -# create link to unpack directory -symlink($unpack_dir, "unpacked") - or fail("cannot symlink to unpack directory $unpack_dir"); - # fix permissions -spawn('chmod', '-R', 'u+rwX,o+rX,o-w', $unpack_dir) == 0 or fail(); +spawn('chmod', '-R', 'u+rwX,o+rX,o-w', "$base_dir/unpacked") == 0 or fail(); exit 0; @@ -70,3 +66,9 @@ } exit 1; } + +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: +# vim: syntax=perl sw=4 sts=4 ts=4 et shiftround -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]