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 03E62158091 for ; Fri, 3 Jun 2022 04:45:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 086D7E0870; Fri, 3 Jun 2022 04:45:52 +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 9603BE07B3 for ; Fri, 3 Jun 2022 04:45:51 +0000 (UTC) Date: Fri, 3 Jun 2022 00:45:47 -0400 From: Ionen Wolkens To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [PATCH 0/2] Add esed.eclass for sed that dies if caused no changes Message-ID: Mail-Followup-To: gentoo-dev@lists.gentoo.org References: <20220531112319.29168-1-ionen@gentoo.org> <4906a074d4ad938f5efb3c257128ae34efcf2cb6.camel@gentoo.org> 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 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="XWarbTFD1d5fXrQj" Content-Disposition: inline In-Reply-To: <4906a074d4ad938f5efb3c257128ae34efcf2cb6.camel@gentoo.org> X-Archives-Salt: 5c21e676-d921-42f7-b1cd-bb52da2c58e2 X-Archives-Hash: c650998f24830da10744125e98e609f9 --XWarbTFD1d5fXrQj Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 03, 2022 at 06:09:38AM +0200, Micha=C5=82 G=C3=B3rny wrote: > 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 >=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". About evals, the two eval is just to silence this: var=3D$(printf "\0") The 2>/dev/null doesn't work without wrapping it, aka eval 'var=3D$(printf "\0")' 2>/dev/null No variables are expanded pre-eval so it's just evaluating a static statement. eval can be removed, but it'll be noisy if someone happens to sed binary files. >=20 > 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 > --=20 > Best regards, > Micha=C5=82 G=C3=B3rny >=20 >=20 --=20 ionen --XWarbTFD1d5fXrQj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEx3SLh1HBoPy/yLVYskQGsLCsQzQFAmKZkfsACgkQskQGsLCs QzQEvAf7B+YmxsXISNCZGR5SSiycLaCLpuYh6QcCxStkoepu/PNuzy394jYGFfMt zLzSemzpomg58GuN6jybauog6vhqdwTqiJBMGvecmRutowBwfHSTYFiaOEVBXI6g 4YAuZJv0lGP1HjmqYeRGgyWrrGwzbI4UzHJJCKWdofwuQlskyrNj0ruEQ5aCshJ/ 8eQ8bDh7ooCGOZW0k5LDN+BbqCV9SA8ODqc6ObPkLpJeu4XEYUArFqMD249BWqrm IdqUQLGwDKNqYvAU08Eb1pC+lIwqFUdwJBnwgABDMn9UEN30FKX4ZTwLYeGobD6l zO5l9ITcxWY2nlTZ/4SEJeg0jfCmYA== =P+w1 -----END PGP SIGNATURE----- --XWarbTFD1d5fXrQj--