Why is readlink prefixed with PATH?
I've packaged blesh for Guix. We patch binary paths to work with the non-FHS system like NixOS. One patch we do is to replace the following in ble.pp:
PATH=/bin:/usr/bin readlink -> PATH=/bin:/usr/bin (path to readlink on Guix)
Why is readlink prefixed with PATH? We don't have /bin or /usr/bin so it would be easier for us to remove the PATH prefix entirely.
Thanks! Further discussion here if interested.
Thank you for trying to package ble.sh!
Disclaimer: The corresponding code doesn't exist anymore in the master, so the following answer is for the old version of ble.sh.
Why is readlink prefixed with PATH?
Since readlink is not standardized by POSIX and its feature set varies among the implementations of readlink, we cannot rely on a random readlink picked up from an arbitrary position of the filesystem. Here, the assumption was that /bin/readlink and /usr/bin/readlink in GNU/Linux would be always readlink from GNU coreutils and thus that they have the necessary feature for ble.sh. As far as we can assume (path to readlink on Guix) is always readlink from GNU coreutils, you can safely replace it.
ping @kiasoc5. Do you still have the problem? Are there any further questions? Can I close the issue?
Thanks, I submitted a patch for Guix which you can track here. This issue can be closed.
Thanks!