Re: git: 40ccce5d1a85 - main - comms/mbelib: Fix building with CMake 4

From: Mathieu Arnold <mat_at_freebsd.org>
Date: Mon, 28 Sep 2026 19:08:57 UTC
On Mon, Sep 28, 2026 at 09:37:53PM +0300, Gleb Popov wrote:
> On Mon, Sep 28, 2026 at 8:54 PM Mathieu Arnold <mat@freebsd.org> wrote:
> >
> > There is a nice red "Important" note there:
> > https://docs.freebsd.org/en/books/porters-handbook/book/#slow-patch-automatic-replacements
> 
> What's the rationale for this, I wonder? I understand the preference
> of static patches over sed calls, but making it a hard requirement
> feels too restrictive.

The rationale is that patches are clean, self contained, and easy to
read, while sed commands end up being overly complicated, and people try
to be clever, and then you need a PhD to understand what they actually
do.

The ports tree is for everyone, and anyone should be able to go and
understand how a port work. A patch is simple, it means, this file needs
some modification, and when that file changes, the patch either needs to
be updated or removed. On the other hand, a sed line may end up being
unreadable, and will gladly do nothing if the file has changed.
Someone even had to invent a way to detect when a sed incantation does
nothing any more and report it, because once a sed line is there, it
never says it's wrong, it just sits there.

-- 
Mathieu Arnold