#435 deletion of symlinks into non-existent dirs fails

lisp error
closed-fixed
clisp (525)
6
2007-12-30
2007-12-29
Dan Muller
No

This problem was found using Cygwin CLISP, and duplicated on a Debian system.

DELETE-FILE will not delete a bad symlink if the symlink references a file in a non-existant directory. If the directory path of the target is valid, then DELETE-FILE appears to work.

For example:
cd /tmp
ln -s /tmp/nothing bad-link-1
ln -s /tmp/not-a-dir/nothing bad-link-1

(delete-file #P"/tmp/bad-link-1")
=> #P"/tmp/a-bad-link-1")
(delete-file #P"/tmp/bad-link-2")
=> NIL

And in fact, bad-link-2 is not deleted.

---------------------------------------------------
On Windows:

Output of uname -a:
CYGWIN_NT-5.1 pegasus 1.5.25(0.156/4/2) 2007-12-14 19:21 i686 Cygwin

Actually running on Windows XP Home Edition SP2.

Binaries are latest from mirrors.kernel.org, as of 2007-12-29, installed via Cygwin Setup.

I did not build this CLISP myself.

Output of clisp --version:
GNU CLISP 2.41 (2006-10-13) (built on ATGRZWN502840.avl01.avlcorp.lan [127.0.0.1])
Software: GNU C 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
gcc -O2 -pipe -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -Wno-sign-compare -
O2 -fexpensive-optimizations -falign-functions=4 -DUNICODE -DDYNAMIC_FFI -I. -Wl,--enable-auto-image-base -x none -lint
l -liconv libcharset.a libavcall.a libcallback.a -lreadline -lncurses -lsigsegv
SAFETY=0 HEAPCODES STANDARD_HEAPCODES SPVW_PAGES SPVW_MIXED
libsigsegv 2.4
libiconv 1.11
libreadline 5.1
Features:
(READLINE REGEXP SYSCALLS I18N LOOP COMPILER CLOS MOP CLISP ANSI-CL COMMON-LISP LISP=CL INTERPRETER SOCKETS
GENERIC-STREAMS LOGICAL-PATHNAMES SCREEN FFI GETTEXT UNICODE BASE-CHAR=CHARACTER PC386 UNIX CYGWIN)
C Modules: (clisp i18n syscalls regexp readline)
Installation directory: /usr/lib/clisp/
User language: ENGLISH
Machine: I686 (I686) pegasus [192.168.0.3]

---------------------------------------------------
On Debian Linux:

Output of uname -a:
Linux scorpion 2.6.18-4-k7 #1 SMP Mon Mar 26 17:57:15 UTC 2007 i686 GNU/Linux

Binaries are latest available for Debian testing branch, as of 2007-12-29, installed via aptitude.

I did not build this CLISP myself.

Output of clisp --version:
GNU CLISP 2.41 (2006-10-13) (built 3369758291) (memory 3407938871)
Software: GNU C 4.1.2 20061007 (prerelease) (Debian 4.1.1-16)
/usr/bin/gcc-4.1 -g -O2 -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -Wno-sign-compare -O2 -fexpensive-optimizations -falign-functions=4 -DUNICODE -DDYNAMIC_FFI -DDYNAMIC_MODULES -I. -x none libcharset.a libavcall.a libcallback.a /usr/lib/libreadline.so -lncurses -ldl -L/usr/lib -lsigsegv
SAFETY=0 HEAPCODES LINUX_NOEXEC_HEAPCODES GENERATIONAL_GC SPVW_BLOCKS SPVW_MIXED TRIVIALMAP_MEMORY
libsigsegv 2.4
libreadline 5.1
Features:
(ASDF CLC-OS-DEBIAN COMMON-LISP-CONTROLLER CLX-ANSI-COMMON-LISP CLX READLINE
REGEXP SYSCALLS I18N LOOP COMPILER CLOS MOP CLISP ANSI-CL COMMON-LISP LISP=CL
INTERPRETER SOCKETS GENERIC-STREAMS LOGICAL-PATHNAMES SCREEN FFI GETTEXT
UNICODE BASE-CHAR=CHARACTER PC386 UNIX)
C Modules: (clisp i18n syscalls regexp readline linux clx)
Installation directory: /usr/lib/clisp/
User language: ENGLISH
Machine: I686 (I686) scorpion.home [192.168.0.2]

Discussion

  • Dan Muller

    Dan Muller - 2007-12-29
    • priority: 5 --> 6
     
  • Dan Muller

    Dan Muller - 2007-12-29

    Logged In: YES
    user_id=358502
    Originator: YES

    BTW, bugs 1860489 and 1860677 are impediments to getting unit tests for ASDF-INSTALL working smoothly, as they prevent the unit tests from cleaning up test directory trees reliably. These trees contain internal symlinks which, due to these bugs, prevent the trees from being reliably deleted.

     
  • Sam Steingold

    Sam Steingold - 2007-12-30
    • milestone: --> lisp error
    • assigned_to: haible --> sds
    • summary: Deletion of bad symlinks can silently fail --> deletion of symlinks into non-existent dirs fails
    • status: open --> closed-fixed
     
  • Sam Steingold

    Sam Steingold - 2007-12-30

    Logged In: YES
    user_id=5735
    Originator: NO

    thank you for your bug report.
    the bug has been fixed in the CVS tree.
    you can either wait for the next release (recommended)
    or check out the current CVS tree (see http://clisp.cons.org\)
    and build CLISP from the sources (be advised that between
    releases the CVS tree is very unstable and may not even build
    on your platform).

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks