diff options
author | 2018-04-11 22:15:03 -0400 | |
---|---|---|
committer | 2018-04-11 22:22:46 -0400 | |
commit | 6a99c6752efc2fb6180c3a453ae5b641b67f662e (patch) | |
tree | 5c99bc01672309ccbcb70106c0990a1095982c10 | |
parent | configure.ac: update to version 0.9.4. (diff) | |
download | eselect-php-6a99c6752efc2fb6180c3a453ae5b641b67f662e.tar.gz eselect-php-6a99c6752efc2fb6180c3a453ae5b641b67f662e.tar.bz2 eselect-php-6a99c6752efc2fb6180c3a453ae5b641b67f662e.zip |
src/php.eselect.in.in: use "-f" option to "ln" for POSIX compatibility.
On FreeBSD, we're getting an error:
ln: illegal option -- -
usage: ln [-s [-F] | -L | -P] [-f | -i] [-hnv] source_file [target_file]
...
!!! Error: failed to create active php symlink
This is due to our use of the "--force" flag, which is not POSIX. In
the latest standard (IEEE Std 1003.1-2017), only the short "-f" flag
is guaranteed to exist, and FreeBSD's "ln" seems to mostly support the
flag as specified there. So, I've changed "--force" to "-f", and left
a warning to future generations in a nearby comment.
Bug: https://bugs.gentoo.org/649270
-rw-r--r-- | src/php.eselect.in.in | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/php.eselect.in.in b/src/php.eselect.in.in index 8e25f96..889f541 100644 --- a/src/php.eselect.in.in +++ b/src/php.eselect.in.in @@ -457,7 +457,8 @@ set_sapi() { for link_name in $(sapi_active_link_names "${sapi}"); do local link_target=$(sapi_link_name_target "${sapi}" "${target_name}" "${link_name}") - @LN_S@ --force "${link_tgt_dir}/${link_target}" \ + # Use the short "-f" option for POSIX compatibility. + @LN_S@ -f "${link_tgt_dir}/${link_target}" \ "${link_dir}/${link_name}" || \ die -q "failed to create active ${link_name} symlink" done |