From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 58476 invoked by alias); 22 Oct 2017 12:54:00 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 58463 invoked by uid 89); 22 Oct 2017 12:53:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=HTo:U*kawa, isn, thrilled, isn=e2?= X-HELO: aibo.runbox.com Received: from aibo.runbox.com (HELO aibo.runbox.com) (91.220.196.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 22 Oct 2017 12:53:57 +0000 Received: from [10.9.9.210] (helo=mailfront10.runbox.com) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1e6FlK-00041Z-Fs; Sun, 22 Oct 2017 14:53:54 +0200 Received: from 70-36-239-2.dsl.dynamic.fusionbroadband.com ([70.36.239.2] helo=localhost.localdomain) by mailfront10.runbox.com with esmtpsa (uid:757155 ) (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) id 1e6Fl9-0005D6-HX; Sun, 22 Oct 2017 14:53:43 +0200 Subject: Re: symlink problems with mac os To: =?UTF-8?Q?Bj=c3=b6rn_Raupach?= , "kawa@sourceware.org" References: <7DC458EC-78C0-40B3-871F-5B0E72E43CF5@e2n.de> From: Per Bothner Message-ID: <0cfce2d5-3e68-bf23-95c6-f6fc6e717f99@bothner.com> Date: Sun, 22 Oct 2017 12:54:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <7DC458EC-78C0-40B3-871F-5B0E72E43CF5@e2n.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2017-q4/txt/msg00011.txt.bz2 On 10/22/2017 05:00 AM, Björn Raupach wrote: > The readlink version of macOS isn’t the same as GNU/Linux one. The latter version does follow symlinks with -f. The macOS one does not support this feature. > > I stumbled upon this while working on a port for MacPorts Should make kawa easier to install and upgrade on macOS. (Of course it is already simple enough being a jar file and such…) There is a Homebrew port fof Kawa which avoids the problem by patching bin/kawa before installing it: https://github.com/Homebrew/homebrew-core/blob/master/Formula/kawa.rb Another option is to install GNU readlink. I considered replacing readlink -f by realpath, but as Mac OS doesn't have readlink either, I don't see how that would help. We could make the script more complicated, so it can work with plain readlink, perhaps based on https://github.com/mkropat/sh-realpath/blob/master/realpath.sh . I'm not thrilled to complicate the script that much, but it may be better than adding a dependency. The reason for the readlink to handle the case that you install kawa as a symlink for example /usr/local/bin/kawa -> /opt/kawa-3.0/bin/kawa . I think that is useful to support - and it doesn't work without the -f. -- --Per Bothner per@bothner.com http://per.bothner.com/