public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH 0/2] Add esed.eclass for sed that dies if caused no changes
@ 2022-05-31 11:23 Ionen Wolkens
  2022-05-31 11:23 ` [gentoo-dev] [PATCH 1/2] esed.eclass: new eclass Ionen Wolkens
                   ` (6 more replies)
  0 siblings, 7 replies; 25+ messages in thread
From: Ionen Wolkens @ 2022-05-31 11:23 UTC (permalink / raw
  To: gentoo-dev

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



^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2022-06-04 16:53 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-31 11:23 [gentoo-dev] [PATCH 0/2] Add esed.eclass for sed that dies if caused no changes Ionen Wolkens
2022-05-31 11:23 ` [gentoo-dev] [PATCH 1/2] esed.eclass: new eclass Ionen Wolkens
2022-05-31 13:45   ` Ionen Wolkens
2022-06-03  7:14   ` Ulrich Mueller
2022-06-03  9:26     ` Ionen Wolkens
2022-06-03 11:19       ` Ionen Wolkens
2022-05-31 11:23 ` [gentoo-dev] [PATCH 2/2] eclass/tests/esed.sh: basic tests for esed.eclass Ionen Wolkens
2022-05-31 13:54 ` [gentoo-dev] [PATCH 0/2] Add esed.eclass for sed that dies if caused no changes Anna
2022-05-31 14:29   ` Ionen Wolkens
2022-05-31 14:44     ` Jaco Kroon
2022-06-03  4:09 ` Michał Górny
2022-06-03  4:45   ` Ionen Wolkens
2022-06-03  4:47     ` Anna V
2022-06-03  5:01       ` Ionen Wolkens
2022-06-03  5:00     ` Anna V
2022-06-03  5:05   ` Ionen Wolkens
2022-06-03  4:59 ` Sam James
2022-06-03  5:02   ` Sam James
2022-06-03 11:36 ` [gentoo-dev] [PATCH v2 0/1] esed Ionen Wolkens
2022-06-03 11:36   ` [gentoo-dev] [PATCH v2 1/1] esed.eclass: new eclass Ionen Wolkens
2022-06-04  0:15     ` Oskari Pirhonen
2022-06-04  7:00       ` Ionen Wolkens
2022-06-03 14:13   ` [gentoo-dev] [PATCH v2 0/1] esed Ionen Wolkens
2022-06-04 16:19 ` [gentoo-dev] [PATCH 0/2] Add esed.eclass for sed that dies if caused no changes Alessandro Barbieri
2022-06-04 16:53   ` Ionen Wolkens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox