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

Bug#3992: install-info shouldn't try to lock the dir file during --test

Package: dpkg
Version: 1.2.12elf

If you run install-info in --test mode, it still tries to lock the
/usr/info/dir file.  If you don't happen to currently have write
permission there, it fails.

Here's a unified diff that fixes this:
(this message is unsigned since it screws with the diff below.  I need
to integrate tm into xemacs.)
--- /usr/sbin/install-info.orig	Thu Jul 25 19:56:28 1996
+++ /usr/sbin/install-info	Thu Jul 25 23:08:33 1996
@@ -205,7 +205,7 @@
-if (!link("$infodir/dir","$infodir/dir.lock")) {
+if (!$nowrite && !link("$infodir/dir","$infodir/dir.lock")) {
     die "$name: failed to lock dir for editing! $!\n".
         ($! =~ m/exists/i ? "try deleting $infodir/dir.lock ?\n" : '');
@@ -335,9 +335,8 @@
         &ulquit("$name: cannot backup old $infodir/dir, giving up: $!\n");
     rename("$infodir/dir.new","$infodir/dir") ||
         &ulquit("$name: install new $infodir/dir: $!\n");
 unlink("$infodir/dir.lock") || die "$name: unlock $infodir/dir: $!\n";
 sub ulquit {
     unlink("$infodir/dir.lock") ||

<torin@daft.com> <http://www.daft.com/~torin> <torin@debian.org> <torin@io.com>
Darren Stalder/2608 Second Ave, @282/Seattle, WA 98121-1212/USA/+1-800-921-4996
@ Do you have your clothes on? I probably don't. Take yours off. Feel better. @
@ Sysadmin, webweaver, postmaster for hire.  C/Perl/CGI programmer and tutor. @

Reply to: