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

next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000003ca13206103ebd00
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

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=E2=80=AFPM Jamie Landeg-Jones <jamie@catflap.o=
rg>
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 th=
is
> > 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 s=
et
> the "pipefail" option - these scripts are updated when you update the por=
ts
> 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 erro=
rs
> are potentially not trapped, but if that's the case you're likely to noti=
ce
> the failure anyway.
>
> Still best to update your system or your /bin/sh though!
>
> Cheers, Jamie
>


--=20
Mario.

--0000000000003ca13206103ebd00
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Jamie,</div><div><br></div><div>I ran your script and=
 it gave no error message,BUT I still got the error :=C2=A0</div><div><br><=
/div><div>root@marietto:/usr/ports/ports-mgmt/pkg # make<br></div><div>set:=
 illegal option -o pipefail....</div><div><br></div><div>?<br></div></div><=
br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Wed,=
 Jan 31, 2024 at 1:16=E2=80=AFPM Jamie Landeg-Jones &lt;<a href=3D"mailto:j=
amie@catflap.org">jamie@catflap.org</a>&gt; wrote:<br></div><blockquote cla=
ss=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid =
rgb(204,204,204);padding-left:1ex">Mario Marietto &lt;<a href=3D"mailto:mar=
ietto2008@gmail.com" target=3D"_blank">marietto2008@gmail.com</a>&gt; wrote=
:<br>
<br>
&gt; What I haven&#39;t understood is why you are talking about newer ports=
 when the<br>
&gt; only thing I do is to update ports using the same FreeBSD version,in t=
his<br>
&gt; case 10.4. I mean,upgrading ports without upgrading the version of<br>
&gt; FreeBSD,can&#39;t mean to use newer ports,since I don&#39;t use a newe=
r version of<br>
&gt; the OS.<br>
<br>
The ports infrastucture (under /usr/ports/Mk) now contains scripts that set=
<br>
the &quot;pipefail&quot; option - these scripts are updated when you update=
 the ports<br>
tree.<br>
<br>
I had an old out-of-date box for a while, and used this quick hack to get<b=
r>
it to work.<br>
<br>
You need to run this after you update the ports tree:<br>
<br>
sed -i.bak &#39;/^[[:space:]]*set [+-]o pipefail/d&#39; /usr/ports/Mk/Scrip=
ts/*<br>
<br>
It removes the references to pipefail. This can mean that some build errors=
<br>
are potentially not trapped, but if that&#39;s the case you&#39;re likely t=
o notice<br>
the failure anyway.<br>
<br>
Still best to update your system or your /bin/sh though!<br>
<br>
Cheers, Jamie<br>
</blockquote></div><br clear=3D"all"><br><span class=3D"gmail_signature_pre=
fix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature">Mario.<br></d=
iv>

--0000000000003ca13206103ebd00--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B1FSiifR-oyq%2BF=uG-6Lu_meRGvbPSqoKBYeqa3VjBn-1JJmA>