Il giorno mar 31 mag 2022 alle ore 13:23 Ionen Wolkens <io...@gentoo.org>
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

Reply via email to