SOLVED: Re: Strange warning/file when doing a selfupdate

Bas Jansen bas_work at icloud.com
Tue Aug 13 12:22:25 UTC 2024


Hi Bill and Richard,

> On 13 Aug 2024, at 14:00, macports-users-request at lists.macports.org wrote:
> 
> 
> Date: Mon, 12 Aug 2024 14:14:54 +0200
> From: Bas Jansen <bas_work at icloud.com>
> To: macports-users at lists.macports.org
> Subject: Strange warning/file when doing a selfupdate
> Message-ID: <2F0DB406-7CEC-4A8D-97F8-BFB6A10D1E81 at icloud.com>
> Content-Type: text/plain; charset="utf-8"
> 
> Hi,
> 
> When doing a self update via Terminal, I get the following warning:
> 
> ~$ sudo port upgrade outdated
> Nothing to upgrade.
> --->  Scanning binaries for linking errors
> Warning: Error parsing file /opt/local/bin/g[: Error opening or reading file
> --->  No broken files found.                             
> --->  No broken ports found.
> 
> Emphasis mine, of course. There is no file ?g[? in /opt/local/bin/. I ran this using macports 2.10.0, macOS Sonoma 14.6.1 on an Intel MacBook Pro, late 2019. Anyone know what this means?
> 
> Kind regards,
> Bas
> 
> ---------------------------
> Date: Mon, 12 Aug 2024 09:44:14 -0400
> From: Bill Cole <macportsusers-20171215 at billmail.scconsult.com>
> To: Bas Jansen via macports-users <macports-users at lists.macports.org>
> Subject: Re: Strange warning/file when doing a selfupdate
> Message-ID:
> 	<2A793D61-0600-476C-A4E6-58B938B21E2A at billmail.scconsult.com>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
> 
> On 2024-08-12 at 08:14:54 UTC-0400 (Mon, 12 Aug 2024 14:14:54 +0200)
> Bas Jansen via macports-users <bas_work at icloud.com>
> is rumored to have said:
> 
> [….]
> If you've installed the coreutils package, /opt/local/bin/g[ *should* 
> exist. It is the GNU version of '[' which is better known as 'test'. You 
> may be able to resolve this by reinstalling coreutils.
> 
> I do not know the history of why '[' exists apart from 'test' but it 
> does, in most systems as a hardlink. The MacPorts coreutils package 
> includes both as distinct files.
> 
> 
> 
> -- 
> Bill Cole
> bill at scconsult.com or billcole at apache.org
> (AKA @grumpybozo at toad.social and many *@billmail.scconsult.com 
> addresses)
> Not Currently Available For Hire
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.macports.org/pipermail/macports-users/attachments/20240812/80262905/attachment-0001.htm>
> ------------------------------
> 
> Date: Mon, 12 Aug 2024 10:06:36 -0400
> From: "Richard L. Hamilton" <rlhamil at smart.net>
> To: macports-users list <macports-users at lists.macports.org>
> Subject: Re: Strange warning/file when doing a selfupdate
> Message-ID: <B60B51CA-2279-4881-A533-4E0EA73B9D8D at smart.net>
> Content-Type: text/plain; charset="utf-8”
> 
> […]
> 
> Instead of saying
> 
> test -r $file
> 
> you can say
> 
> [ -r $file ]
> 
> I've seen it before that builtins are also separate commands on various systems; there must be some requirement. Some implement that by using a script of one of the shells that has the builtin, or with a special executable that implements a bunch of such commands via hard links.

Thanks both for your input, helpful! I have indeed removed and then re-installed coreutils, and sure enough, g[ is there. Also, the warning has disappeared.

Kind regards,
Bas



More information about the macports-users mailing list