[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#26512: Fixes to make dpkg-gencontrol and dpkg-shlibdeps work over NFS



Package: dpkg-dev
Version: 1.4.0.27

The Linux NFS client (at least in 2.1) does not allow renaming of a file to a
file which is open. Since dpkg-gencontrol and dpkg-shlibdeps first open files
and substvars, respectively, and they try to move the newly created version
into the same spot, they need to be careful about closing the old file before
attempting the rename. They are not. Patches follow.

Regards,
/Anders

--- dpkg-gencontrol.orig	Sun Sep  6 23:52:22 1998
+++ /usr/bin/dpkg-gencontrol	Sun Sep  6 23:51:10 1998
@@ -212,6 +212,7 @@
                 && ($1 eq $oppackage) && ($2 eq $arch);
         print(Y "$_\n") || &syserr("copy old entry to new files list file");
     }
+    close(X);
 } elsif ($! != ENOENT) {
     &syserr("read old files list file");
 }
--- dpkg-shlibdeps.orig	Sun Sep  6 23:55:57 1998
+++ /usr/bin/dpkg-shlibdeps	Sun Sep  6 23:49:38 1998
@@ -203,6 +203,7 @@
             print(Y "$_\n") ||
                 syserr("copy old entry to new varlist file \`$varlistfile.new'");
         }
+	close(X);
     } elsif ($! != ENOENT) {
         syserr("open old varlist file \`$varlistfile' for reading");
     }

-- 
 -- Of course I'm crazy, but that doesn't mean I'm wrong.
Anders Hammarquist                              | iko@{cd.chalmers,iko.pp}.se
Physics Student, UNIX Hacker, Debian Maintainer | Tel: +46.31.47 69 27
Jag ska b|rja plugga i l{svecka 1...            | Cel: +46.707.27 86 87


Reply to: