From: Wichert Akkerman Date: Sat, 3 Feb 2001 13:58:13 +0000 (+0000) Subject: scripts/dpkg-statoverride.pl: use -e instead of -f to test X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3833b1dceafe057c4cc7ae87225f582122789e1;p=dpkg scripts/dpkg-statoverride.pl: use -e instead of -f to test for filesystem object existance scripts/dpkg-source.pl: swap chdir and open in extracttar to prevent race with source-directory being removed while the sh/grep process is still running. Patch from Colin Watson --- diff --git a/ChangeLog b/ChangeLog index fc802bd9..7b31de86 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Fri Feb 2 14:27:47 CET 2001 Wichert Akkerman + + * scripts/dpkg-statoverride.pl: use -e instead of -f to test + for filesystem object existance + * scripts/dpkg-source.pl: swap chdir and open in extracttar to + prevent race with source-directory being removed while the + sh/grep process is still running. Patch from Colin Watson + Thu Feb 1 18:22:05 EST 2001 Wichert Akkerman * scripts/dpkg-source.pl: fix error in error message diff --git a/debian/changelog b/debian/changelog index a3f139f1..243df9bc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,13 +6,18 @@ dpkg (1.9.0) unstable; urgency=low a warning if used. * Update French translation, Closes: Bug#65284 * Add French manpages, courtesy of Philippe Batailler - * Ingore vim swapfiles in dpkg-soruce, Closes: Bug#81630 + * Ingore vim swapfiles in dpkg-source, Closes: Bug#81630 * remove --import option from dpkg-statoverride, Closes: Bug#81358 * Replace nfmalloc implementation with obstack. Added obstack.[ch] to optlib, for non-GNU systems. * dpkg-divert only allows absolute filenames now. Closes: Bug#82419 * Handle diffs from non-existing files to existing files. Closes: Bug#82708 * Small fixes to the buildsystem. Closes: Bug#84361 + * Fix dpkg-statoverride --update for things other then plain files. + Closes: Bug#84449 + * Fix race with source directory disappearing in dpkg-source. + chdir("$dirchdir") || &syserr("cannot chdir to \`$dirchdir' for tar extract"); + Closes: Bug#82797 -- Wichert Akkerman UNRELEASED diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl index f7744fa8..4ca6c953 100755 --- a/scripts/dpkg-source.pl +++ b/scripts/dpkg-source.pl @@ -935,8 +935,8 @@ sub extracttar { &forkgzipread("$tarfileread"); defined($c2= fork) || &syserr("fork for tar -xkf -"); if (!$c2) { - chdir("$dirchdir") || &syserr("cannot chdir to \`$dirchdir' for tar extract"); open(STDIN,"<&GZIP") || &syserr("reopen gzip for tar -xkf -"); + chdir("$dirchdir") || &syserr("cannot chdir to \`$dirchdir' for tar extract"); &cpiostderr; exec('tar','-xkf','-'); &syserr("exec tar -xkf -"); } diff --git a/scripts/dpkg-statoverride.pl b/scripts/dpkg-statoverride.pl index 58fd5148..4b47161e 100755 --- a/scripts/dpkg-statoverride.pl +++ b/scripts/dpkg-statoverride.pl @@ -113,7 +113,7 @@ if ($mode eq "add") { $dowrite=1; if ($doupdate) { - if (not -f $file) { + if (not -e $file) { print STDERR "warning: --update given but $file does not exist\n"; } else { chown ($uid,$gid,$file) || warn "failed to chown $file: $!\n";