Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jan 2024 12:16:35 +0000
From:      Jamie Landeg-Jones <jamie@catflap.org>
To:        wojtek@puchar.net, marietto2008@gmail.com
Cc:        freebsd-questions@FreeBSD.org, freebsd-hackers@FreeBSD.org
Subject:   Re: set : illegal option -o pipefail error while trying to upgrade pkg.
Message-ID:  <202401311216.40VCGZSo001051@donotpassgo.dyslexicfish.net>
In-Reply-To: <CA%2B1FSihN7RpC9Wsh5pPnzX1dJHJgFQPsF=dRA6zQoJ5WiBdChQ@mail.gmail.com>
References:  <CA%2B1FSijXJUDtkmf0KKEtCJ_cFhg4Htc_a=q1BWt9mtGV1T7oLw@mail.gmail.com> <80d527f-df83-5657-6a2a-262156e08440@puchar.net> <CA%2B1FSihN7RpC9Wsh5pPnzX1dJHJgFQPsF=dRA6zQoJ5WiBdChQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202401311216.40VCGZSo001051>