Browse Source

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

Wichert Akkerman 25 years ago
parent
commit
d3833b1dce
4 changed files with 16 additions and 3 deletions
  1. 8 0
      ChangeLog
  2. 6 1
      debian/changelog
  3. 1 1
      scripts/dpkg-source.pl
  4. 1 1
      scripts/dpkg-statoverride.pl

+ 8 - 0
ChangeLog

@@ -1,3 +1,11 @@
+Fri Feb  2 14:27:47 CET 2001 Wichert Akkerman <wakkerma@debian.org>
+
+  * 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 <wakkerma@debian.org>
 
   * scripts/dpkg-source.pl: fix error in error message

+ 6 - 1
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 <wakkerma@debian.org>  UNRELEASED
 

+ 1 - 1
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 -");
     }

+ 1 - 1
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";