subdirs.el file disappears during emacs20 installation
On one of my systems, Emacs is ignoring byte-compiled files and
loading the elisp files instead. I eventually figured out that the
directories with the byte-compiled files are not being added to
load-path during initialization. The command to do that should be in
the file /usr/share/emacs/20.7/site-lisp/subdirs.el, which is
*missing*.
The file is in the package:
voyager:/var/lib/dpkg/info# cd /tmp
voyager:/tmp# dpkg --contents emacs20_20.7-2.deb |grep subdirs
-rw-r--r-- root/root 255 2000-06-20 12:45:08 ./usr/share/emacs/20.7/lisp/subdirs.el
-rw-r--r-- root/root 106 2000-06-20 12:45:08 ./usr/share/emacs/20.7/site-lisp/subdirs.el
-rw-r--r-- root/root 106 2000-06-20 12:45:08 ./usr/share/emacs/site-lisp/subdirs.el
Re-installing the package does not help.
The destination directory exists, is writable, and has other files:
voyager:/tmp# ls -ld /usr/share/emacs/20.7/site-lisp/
drwxr-xr-x 6 root root 1024 Nov 30 08:06 /usr/share/emacs/20.7/site-lisp/
voyager:/tmp# ls -l /usr/share/emacs/20.7/site-lisp/
total 57
-rw-r--r-- 1 root root 41018 Nov 30 07:41 crypt++.elc
-rw-r--r-- 1 root root 2437 Nov 30 07:41 debian-startup.elc
drwxr-xr-x 2 root root 7168 Nov 30 08:05 emacspeak
drwxr-xr-x 2 root root 1024 Nov 30 08:06 mailcrypt
drwxr-xr-x 2 root root 1024 Nov 30 08:06 octave
drwxr-xr-x 2 root root 3072 Nov 30 08:08 tm
That is the only file missing from the package:
voyager:/var/lib/dpkg/info# for x in `cat emacs20.list`; do if [ ! -e $x ]; then echo "$x is missing"; fi; done
/usr/share/emacs/20.7/site-lisp/subdirs.el is missing
During an installation, the file is created (by a rename) and still
exists a bit later when process 732 looks for it. However, it has
disappeared when the next process looks for it:
# strace -o log -ff -e trace=file dpkg -i emacs20_20.7-2.deb
...
# grep /usr/share/emacs/20.7/site-lisp/subdirs.el log log.???
log:lstat("/usr/share/emacs/20.7/site-lisp/subdirs.el", 0xbfffee7c) = -1 ENOENT (No such file or directory)
log:rename("/usr/share/emacs/20.7/site-lisp/subdirs.el.dpkg-tmp", "/usr/share/emacs/20.7/site-lisp/subdirs.el") = -1 ENOENT (No such file or directory)
log:rmdir("/usr/share/emacs/20.7/site-lisp/subdirs.el.dpkg-new") = -1 ENOENT (No such file or directory)
log:rmdir("/usr/share/emacs/20.7/site-lisp/subdirs.el.dpkg-tmp") = -1 ENOENT (No such file or directory)
log:open("/usr/share/emacs/20.7/site-lisp/subdirs.el.dpkg-new", O_WRONLY|O_CREAT|O_EXCL, 0444) = 8
log:utime("/usr/share/emacs/20.7/site-lisp/subdirs.el.dpkg-new", [100/12/01-22:14:52, 100/06/20-12:45:08]) = 0
log:rename("/usr/share/emacs/20.7/site-lisp/subdirs.el.dpkg-new", "/usr/share/emacs/20.7/site-lisp/subdirs.el") = 0
log:rmdir("//usr/share/emacs/20.7/site-lisp/subdirs.el.dpkg-tmp") = -1 ENOENT (No such file or directory)
log.732:stat("/usr/share/emacs/20.7/site-lisp/subdirs.el", {st_mode=S_IFREG|0644, st_size=106, ...}) = 0
log.732:open("/usr/share/emacs/20.7/site-lisp/subdirs.el", O_RDONLY) = 7
log.732:stat("/usr/share/emacs/20.7/site-lisp/subdirs.el", {st_mode=S_IFREG|0644, st_size=106, ...}) = 0
log.732:open("/usr/share/emacs/20.7/site-lisp/subdirs.el", O_RDONLY) = 7
log.732:stat("/usr/share/emacs/20.7/site-lisp/subdirs.el", {st_mode=S_IFREG|0644, st_size=106, ...}) = 0
log.732:open("/usr/share/emacs/20.7/site-lisp/subdirs.el", O_RDONLY) = 7
log.767:stat("/usr/share/emacs/20.7/site-lisp/subdirs.el", 0xbffff10c) = -1 ENOENT (No such file or directory)
log.798:stat("/usr/share/emacs/20.7/site-lisp/subdirs.el", 0xbffff0ec) = -1 ENOENT (No such file or directory)
log.813:stat("/usr/share/emacs/20.7/site-lisp/subdirs.el", 0xbffff0ec) = -1 ENOENT (No such file or directory)
log.824:stat("/usr/share/emacs/20.7/site-lisp/subdirs.el", 0xbffff0ec) = -1 ENOENT (No such file or directory)
log.833:stat("/usr/share/emacs/20.7/site-lisp/subdirs.el", 0xbffff0fc) = -1 ENOENT (No such file or directory)
...
There is plenty of space on the disk even after emacs is installed:
voyager:/tmp$ df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hda6 987220 880857 55359 94% /
/dev/hda7 987220 860029 76187 92% /home
/dev/hda1 819056 462416 356640 56% /c
/dev/hda8 1771793 1689749 63731 96% /backups
What on earth is going on here?
- Jim Van Zandt
Reply to: