From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5BB57158091 for ; Fri, 3 Jun 2022 04:09:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EDB6AE0837; Fri, 3 Jun 2022 04:09:43 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2E0B7E07A9 for ; Fri, 3 Jun 2022 04:09:43 +0000 (UTC) Message-ID: <4906a074d4ad938f5efb3c257128ae34efcf2cb6.camel@gentoo.org> Subject: Re: [gentoo-dev] [PATCH 0/2] Add esed.eclass for sed that dies if caused no changes From: =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Date: Fri, 03 Jun 2022 06:09:38 +0200 In-Reply-To: <20220531112319.29168-1-ionen@gentoo.org> References: <20220531112319.29168-1-ionen@gentoo.org> Organization: Gentoo Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.2 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 X-Archives-Salt: 91b33ba5-5536-4da4-b97a-9234ae617cc7 X-Archives-Hash: 7097a4428a81cb36b8d756847f4a6f11 On Tue, 2022-05-31 at 07:23 -0400, Ionen Wolkens wrote: > Often preferable to use patches so this happens, but sed have its > uses/convenience and this intend to help reduce the amount of old > broken seds causing issues that go unnoticed on bumps. >=20 > Inspired by app-portage/iwdevtools' qa-sed (warns on any seds), but > this is for more deterministic use in ebuilds. >=20 > Also slightly shortens sed use, -i is default, and no need to || die. > (see @EXAMPLE in eclass for a quick usage overview). >=20 To be honest, I strongly dislike this. It really feels like trying to make an adapter for a square wheel, while the right solution would be to replace the wheel. On top of that, ton of evals which are pretty much a huge "no-no". Perhaps it would be better to forget about trying to work miracles with sed and instead write a trivial shell replacement for the most common use cases. One thing I'd love to see is a simple substitution command that would work for paths/CFLAGS on RHS without having to worry about them conflicting with the pattern delimiter. --=20 Best regards, Micha=C5=82 G=C3=B3rny