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

Bug#149491: dpkg depends hard on working F_SETLK fcntl

Package: dpkg
Version: 1.9.21

dpkg refuses to operate ("unable to lock dpkg status database"),
if the F_SETLK fcntl doesn't work on the filesystem where
/var/lib/dpkg/lock is located.

That's bad because it's not easy to get F_SETLK to work on NFS.

That's especially hard if you're trying to do a Debian installation
in a tight environment, where you'd rather have no locking at
all than having dpkg just say "No!".

I ran into this when trying to install Debian from

The installer said
"Failure trying to run: chroot /target dpkg --force-depends --install /var/cache/apt/archives/base-files_3.0.2_powerpc.deb /var/cache/apt/archives/base-passwd_3.4.1_powerpc.deb"
and on that other console it showed
"dpkg: unable to lock dpkg status database: No locks available".

It would be nice if the user could at least work around this problem
from within the shell provided on the installation CD.  I don't currently
see such a workaround, but any one of the following changes to dpkg would
make it possible:

o Use
  instead of
  as the lock file.  (workaround uses ramdisk)

o Use
  as the lock file if
  exists.  (workaround uses ramdisk)

o Don't care about locking if /dpkg-dont-lock exists.  (My favorite!)

o Fall back to some other locking mechanism (?) if F_SETLK
  is unavailable.  (Would be best, but needs some work.)

To UNSUBSCRIBE, email to debian-dpkg-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: