Tiny Core Base > TCB Bugs

TC 8.? and TC 9.0 filename globing of ash ignores names of broken symlinks

(1/3) > >>

TinyErestor:
Hello,

possibly since TC 8.0 ash in busybox does not include filenames of broken symlinks into the results of filename globbing.
As an example:

--- Code: ---mkdir glob_test
ln -s missing glob_test/broken
echo glob_test/br*
--- End code ---
should echo
--- Code: ---glob_test/broken
--- End code ---
but echos
--- Code: ---glob_test/br*
--- End code ---

I remeber, in some other context, something like that was mentioned. But it was not about filename pattern in ash but about rm or mv on such broken symlinks.

And I have not found another topic about that bug in this forum.

Regards

Juanito:
This error only happens with 32bit Core and not 64bit CorePure - both use the same busybox config

The error has been reported to busybox, but they cannot reproduce it.

TinyErestor:
Hello,

in the topic about the new release TC 9.0 I found this statement:

--- Quote ---Note that there is a pending issue in that the 32-bit busybox mv will not move broken symlinks - this seems to be caused by updated versions of gcc and/or glibc.
--- End quote ---
I have tested the mv command in TC 9.0 and it works with broken symlinks:

--- Code: ---mkdir glob_test
ln -s missing glob_test/broken
mv glob_test/broken glob_test/newname
ls glob_test

--- End code ---
results in
--- Code: ---newname
--- End code ---
. The mv worked.
Used software:

--- Code: ---tc@AcerBox:~$ type mv
mv is /bin/mv
tc@AcerBox:~$ ls -l /bin/mv
lrwxrwxrwx    1 root     root             7 Jan  6 13:10 /bin/mv -> busybox
tc@AcerBox:~$ ls -l /bin/busybox
-rwxr-xr-x    1 root     root        497371 Nov  6 15:00 /bin/busybox
tc@AcerBox:~$ ldd /bin/busybox
linux-gate.so.1 (0xf7788000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0xf7743000)
libm.so.6 => /lib/libm.so.6 (0xf7703000)
libc.so.6 => /lib/libc.so.6 (0xf75f0000)
/lib/ld-linux.so.2 (0x565ed000)

--- End code ---

So, the above mentioned issue is realy this bug with the globing?
I may see into it, the used sources are in the TinyCore repositories, I guess.

Regards

Juanito:
If you try this:
--- Code: ---$ mkdir -p test/old test/new
$ cd test/old
$ touch some-file
$ ln -s some-file good-link
$ ln -s no-file bad-link
$ mv * ../new
$ cd ..
$ find

--- End code ---

The broken link "bad-link" will remain in the old directory, and not get moved to the new directory. In 64-bit they all get moved, as they should.

The busybox source and config are at:

http://tinycorelinux.net/8.x/x86/release/src/busybox/

Note that I have tried busybox-1.28.1 and the problem remains.

TinyErestor:
Hi Juanito,


--- Quote from: Juanito on March 17, 2018, 07:35:12 AM ---The broken link "bad-link" will remain in the old directory, and not get moved to the new directory. In 64-bit they all get moved, as they should.
--- End quote ---
yes, but this is not the fault of mv. It is the fault of the shell, which expands * wrongly.


--- Quote ---The busybox source and config are at:

http://tinycorelinux.net/8.x/x86/release/src/busybox/

Note that I have tried busybox-1.28.1 and the problem remains.

--- End quote ---
Thanks, I will take a look.

Regards

Navigation

[0] Message Index

[#] Next page

Go to full version