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 ACAC6158091 for ; Sat, 4 Jun 2022 16:19:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 21253E088B; Sat, 4 Jun 2022 16:19:47 +0000 (UTC) Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C3D1CE0878 for ; Sat, 4 Jun 2022 16:19:46 +0000 (UTC) Received: by mail-lj1-x236.google.com with SMTP id b12so525136ljq.3 for ; Sat, 04 Jun 2022 09:19:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=r5EwjWtJyufTWmkjKkh37j4aDJM8gD1RaSWY1uQuFn8=; b=oE4SkC0a1hVLvW3SOSAha1ZMmBGoLw3ZLKghgCzY3G4AuSEUVTF2hcVA/1Tfo8jZQw fzKWSsd7x8beoZsA73xCpVjDD60XohcSaTVBAexuocYOstpqne5z0YRYxPCNrJOKac0A UZqEFjZf8Iu+359ENJ3Me8rHHHQvBbh3KAylES0dw3jznRFHUGlh6GDp861bAMl01PMF 9iA+Qp94td/4+JLb7xEDZF1pREpIZM4qepldhAPiPmUYISxEBeuCKQulRDMNuOzQpgAB n17HQvaKfjfguaUaFThh1llns4FlKDtjvSEVRUOWJoWfw1PcCDtIidMouUIJ4FSceJxT rf5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=r5EwjWtJyufTWmkjKkh37j4aDJM8gD1RaSWY1uQuFn8=; b=bTgExZtNp1xRIKgzczoKyD7nv4SI9enikt5fegrwDXthcnCBm5NqEdndd51Xn9Bc2Q J3oTj4yzxZKViywlOMUZrye2eLSr3EE0V1xTBH6rvWwpirwWPVM0lxMqldyvZwksGkPC 2pdH930aw0+LHMrVVxFOUYtMZtxSiQpZA9KWRcNAdO5snnT7s9D+v/z0BFOvJAzgIZnP 8QiYnbAKZNcRwp/SaUzVWrzP2vBUqOIDWxGwtWm5cYj2THhJy1IWGs/ftLXwq0346Ou9 DuLQHBXTCpOi0HAjlQRP+ex+DhmKOpMg0/uuEgpD+uEFoVY/ZEhJ90hMg+qMhUbu9/6Z lrUg== X-Gm-Message-State: AOAM530QgJvlK6NxirbfK2JNUewBX2573zXKC1YodpE5Agw9QpCJojNb /7TxuB2sv+3XCviEmSWtrZKPmgu6kvuyIVOU/q6Ize0E X-Google-Smtp-Source: ABdhPJyQUdeCmW+5bWR7X2CyzqYlKDBg49hWTl7sorlThPcD+U+b87JDDB364DgzUrDLyu3lLmErCoKxPVZQ9cHHZII= X-Received: by 2002:a2e:7f17:0:b0:253:adc1:697f with SMTP id a23-20020a2e7f17000000b00253adc1697fmr46100401ljd.418.1654359585194; Sat, 04 Jun 2022 09:19:45 -0700 (PDT) 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 References: <20220531112319.29168-1-ionen@gentoo.org> In-Reply-To: <20220531112319.29168-1-ionen@gentoo.org> From: Alessandro Barbieri Date: Sat, 4 Jun 2022 18:19:30 +0200 Message-ID: Subject: Re: [gentoo-dev] [PATCH 0/2] Add esed.eclass for sed that dies if caused no changes To: gentoo-dev@lists.gentoo.org Content-Type: multipart/alternative; boundary="00000000000068090a05e0a19bf1" X-Archives-Salt: e801a17c-5723-42af-ac50-86eb4128d6e7 X-Archives-Hash: 1afea288f4762929c39188822d0a7d97 --00000000000068090a05e0a19bf1 Content-Type: text/plain; charset="UTF-8" Il giorno mar 31 mag 2022 alle ore 13:23 Ionen Wolkens ha scritto: > 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. > > Inspired by app-portage/iwdevtools' qa-sed (warns on any seds), but > this is for more deterministic use in ebuilds. > > Also slightly shortens sed use, -i is default, and no need to || die. > (see @EXAMPLE in eclass for a quick usage overview). > > Implementation / available wrappers / usefulness still up for debate, > but without further comments I consider this ready (albeit first time > touching / making an eclass, so I could be overlooking simple things). > Also partly uses >=bash-4.4, so EAPI-7 is not considered. > > See github PR[1] for old changelog background. > > Up to maintainers but personally would encourage to slowly replace > (almost) all use of sed with either this or patches. Some cases > where it can be inconvenient like eclasses "guessing" that a package > may or may not have something to replace, and that nothing happened > is not an issue. > > [1] https://github.com/gentoo/gentoo/pull/25662 > > Ionen Wolkens (2): > esed.eclass: new eclass > eclass/tests/esed.sh: basic tests for esed.eclass > > eclass/esed.eclass | 199 +++++++++++++++++++++++++++++++++++++++++++ > eclass/tests/esed.sh | 173 +++++++++++++++++++++++++++++++++++++ > 2 files changed, 372 insertions(+) > create mode 100644 eclass/esed.eclass > create mode 100755 eclass/tests/esed.sh > > -- > 2.35.1 > > > I use patches for static content, not a big fan of wall of sed in ebuilds When I use sed is for dynamic content and mostly like to do this: s|lib|$(get_libdir)|g In this case esed would be deleterious because it would fail on 32 bit arches --00000000000068090a05e0a19bf1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Il giorno mar 31 mag 2022 alle ore 13:23 = Ionen Wolkens <ionen@gentoo.org&= gt; ha scritto:
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.

Inspired by app-portage/iwdevtools' qa-sed (warns on any seds), but
this is for more deterministic use in ebuilds.

Also slightly shortens sed use, -i is default, and no need to || die.
(see @EXAMPLE in eclass for a quick usage overview).

Implementation / available wrappers / usefulness still up for debate,
but without further comments I consider this ready (albeit first time
touching / making an eclass, so I could be overlooking simple things).
Also partly uses >=3Dbash-4.4, so EAPI-7 is not considered.

See github PR[1] for old changelog background.

Up to maintainers but personally would encourage to slowly replace
(almost) all use of sed with either this or patches. Some cases
where it can be inconvenient like eclasses "guessing" that a pack= age
may or may not have something to replace, and that nothing happened
is not an issue.

[1] https://github.com/gentoo/gentoo/pull/25662

Ionen Wolkens (2):
=C2=A0 esed.eclass: new eclass
=C2=A0 eclass/tests/esed.sh: basic tests for esed.eclass

=C2=A0eclass/esed.eclass=C2=A0 =C2=A0| 199 ++++++++++++++++++++++++++++++++= +++++++++++
=C2=A0eclass/tests/esed.sh | 173 +++++++++++++++++++++++++++++++++++++
=C2=A02 files changed, 372 insertions(+)
=C2=A0create mode 100644 eclass/esed.eclass
=C2=A0create mode 100755 eclass/tests/esed.sh

--
2.35.1



I use patches for static content, not = a big fan of wall of sed in ebuilds
When I use sed is for dynamic= content and mostly like to do this: s|lib|$(get_libdir)|g
In thi= s case esed would be deleterious because it would fail on 32 bit arches
=
--00000000000068090a05e0a19bf1--