svn commit: r554893 - head/Mk/Scripts

Bryan Drewery bdrewery at FreeBSD.org
Thu Nov 19 23:30:25 UTC 2020


On 11/19/2020 3:03 PM, Jilles Tjoelker wrote:
> On Thu, Nov 19, 2020 at 11:41:57AM -0800, Bryan Drewery wrote:
>> On 11/11/2020 5:29 AM, Mathieu Arnold wrote:
>>> Author: mat
>>> Date: Wed Nov 11 13:29:52 2020
>>> New Revision: 554893
>>> URL: https://svnweb.freebsd.org/changeset/ports/554893
>>> Log:
>>>   Add set pipefail in most framework scripts.
>>>   set pipefail changes the pipeline return status from being the return
>>>   status of the last command to the last non 0 exit status of any command
>>>   in the pipeline.  This is needed to make sure all the commands in a
>>>   pipeline did actually return a non 0 status and not only the last one.
>> [snip]
>>> Modified: head/Mk/Scripts/check-desktop-entries.sh
>>> ==============================================================================
>>> --- head/Mk/Scripts/check-desktop-entries.sh	Wed Nov 11 13:24:31 2020	(r554892)
>>> +++ head/Mk/Scripts/check-desktop-entries.sh	Wed Nov 11 13:29:52 2020	(r554893)
>>> @@ -4,6 +4,7 @@
>>>  # MAINTAINER: portmgr at FreeBSD.org
>>>  
>>>  set -e
>>> +set -o pipefail
>>>  
>>>  . "${dp_SCRIPTSDIR}/functions.sh"
>>>  
>>>
>> This can prevent someone from upgrading from an unsupported release. The
>> workaround is simple enough so I think we should take it rather than
>> create burdens for people.
>>     command set -o pipefail 2>/dev/null || :
> Hmm, does an upgrade require building ports on an old release?

I meant more about upgrading specific ports while having an unsupported
FreeBSD release. As we move towards pkgbase it [ports compat policy]
really could block full system upgrades.

> 
> When scripts are written for use with 'set -o pipefail', allowing them
> to run without it seems unwise.

Very good point. Thank you for the rest of your response too.


directed in general:
Pipefail came in 12.1 which released just 1 year ago. I choose to use a
12.0 jail to ensure compatibility for users. If we are going to make it
harder on users it should be worth it and for something like pipefail
there is often an workaround.

The reality is not everyone is on a supported FreeBSD version but if
they want to upgrade their ports why stop them? I despise us making
draconian decisions about what our users are allowed to do. I think it
is fair to warn them about unsupported FreeBSD version, not block,
before a build and then yell at them on build failure. I think it is
also fair to limit patches to supported releases but rude to drop them
on EOL day. Many ports would still work fine. Breaking the framework is
different.

-- 
Regards,
Bryan Drewery
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/svn-ports-all/attachments/20201119/985e5c3a/attachment.sig>


More information about the svn-ports-all mailing list