Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 649270 - app-eselect/eselect-php: ln: illegal option -- - (on FreeBSD)
Summary: app-eselect/eselect-php: ln: illegal option -- - (on FreeBSD)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-01 21:08 UTC by Michał Górny
Modified: 2018-04-13 17:57 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-03-01 21:08:52 UTC
ln: illegal option -- -                             
usage: ln [-s [-F] | -L | -P] [-f | -i] [-hnv] source_file [target_file]
       ln [-s [-F] | -L | -P] [-f | -i] [-hnv] source_file ... target_dir
       link source_file target_file            
!!! Error: failed to create active php symlink
exiting                                    
 * ERROR: dev-lang/php-7.2.2::gentoo failed (postinst phase):
 *   (no error message)                             
 *                                         
 * Call stack:                               
 *     ebuild.sh, line 124:  Called pkg_postinst
 *   environment, line 2465:  Called die    
 * The specific snippet of code:                      
 *                   eselect php set $m php${SLOT} || die;
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-03-01 21:09:53 UTC
Apparently FreeBSD 'ln' does not support long options, or so I read the error.
Comment 2 Larry the Git Cow gentoo-dev 2018-04-12 02:24:13 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/eselect-php.git/commit/?id=6a99c6752efc2fb6180c3a453ae5b641b67f662e

commit 6a99c6752efc2fb6180c3a453ae5b641b67f662e
Author:     Michael Orlitzky <mjo@gentoo.org>
AuthorDate: 2018-04-12 02:15:03 +0000
Commit:     Michael Orlitzky <mjo@gentoo.org>
CommitDate: 2018-04-12 02:22:46 +0000

    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

 src/php.eselect.in.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)}
Comment 3 Michael Orlitzky gentoo-dev 2018-04-12 02:25:08 UTC
The long options aren't POSIX, so I shouldn't have used it anyway. Care to test the fix before we release it?
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-04-12 19:19:12 UTC
Well, I see no errors and the symlink looks good.
Comment 5 Larry the Git Cow gentoo-dev 2018-04-13 17:57:55 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b35e4a72aac0194fc5ef7fd07f9c84933fd2641

commit 4b35e4a72aac0194fc5ef7fd07f9c84933fd2641
Author:     Michael Orlitzky <mjo@gentoo.org>
AuthorDate: 2018-04-13 17:53:38 +0000
Commit:     Michael Orlitzky <mjo@gentoo.org>
CommitDate: 2018-04-13 17:56:16 +0000

    app-eselect/eselect-php: new version 0.9.5.
    
    Closes: https://bugs.gentoo.org/649270
    Package-Manager: Portage-2.3.24, Repoman-2.3.6

 app-eselect/eselect-php/Manifest                 |  1 +
 app-eselect/eselect-php/eselect-php-0.9.5.ebuild | 44 ++++++++++++++++++++++++
 2 files changed, 45 insertions(+)