Bug 11021

Summary: readlink -f shows different results than coreutils equivalent
Product: Busybox Reporter: Ricardo Ribalda <ricardo.ribalda>
Component: Standard ComplianceAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

Description Ricardo Ribalda 2018-05-17 12:23:46 UTC
Busybox readlink behaves diferently that coreutils readlink:

root@qt5122:~# touch /tmp/this_file_exist
root@qt5122:~# busybox readlink -f /tmp/this_file_exist
/tmp/this_file_exist
root@qt5122:~# readlink -f /tmp/this_file_exist
/tmp/this_file_exist

root@qt5122:~# readlink -f /tmp/this_file_does_not_exist
/tmp/this_file_does_not_exist
root@qt5122:~# busybox readlink -f /tmp/this_file_does_not_exist
root@qt5122:~#

This breaks dpkg


Check:
https://patchwork.openembedded.org/series/12154/#

Thanks!
Comment 1 Denys Vlasenko 2018-05-24 15:31:40 UTC
Fixed in git:

commit 747162109fb1c891baf6aafa1ca0410bd08d04a4
Author: Denys Vlasenko <vda.linux@googlemail.com>
Date:   Thu May 24 17:29:14 2018 +0200

    realpath,readlink -f: coreutils compat, closes 11021
Comment 2 Ricardo Ribalda 2018-05-24 18:24:59 UTC
Thanks!