Re: set : illegal option -o pipefail error while trying to upgrade pkg.

From: Mario Marietto <marietto2008_at_gmail.com>
Date: Wed, 31 Jan 2024 14:31:11 UTC
Jamie,

I ran your script and it gave no error message,BUT I still got the error :

root@marietto:/usr/ports/ports-mgmt/pkg # make
set: illegal option -o pipefail....

?

On Wed, Jan 31, 2024 at 1:16 PM Jamie Landeg-Jones <jamie@catflap.org>
wrote:

> Mario Marietto <marietto2008@gmail.com> wrote:
>
> > What I haven't understood is why you are talking about newer ports when
> the
> > only thing I do is to update ports using the same FreeBSD version,in this
> > case 10.4. I mean,upgrading ports without upgrading the version of
> > FreeBSD,can't mean to use newer ports,since I don't use a newer version
> of
> > the OS.
>
> The ports infrastucture (under /usr/ports/Mk) now contains scripts that set
> the "pipefail" option - these scripts are updated when you update the ports
> tree.
>
> I had an old out-of-date box for a while, and used this quick hack to get
> it to work.
>
> You need to run this after you update the ports tree:
>
> sed -i.bak '/^[[:space:]]*set [+-]o pipefail/d' /usr/ports/Mk/Scripts/*
>
> It removes the references to pipefail. This can mean that some build errors
> are potentially not trapped, but if that's the case you're likely to notice
> the failure anyway.
>
> Still best to update your system or your /bin/sh though!
>
> Cheers, Jamie
>


-- 
Mario.