Gentoo Archives: gentoo-dev

From: Jaco Kroon <jaco@××××××.za>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH 0/2] Add esed.eclass for sed that dies if caused no changes
Date: Tue, 31 May 2022 14:44:19
Message-Id: 5c192ceb-0f27-bc4c-e1b8-aaf1e30569de@uls.co.za
In Reply to: Re: [gentoo-dev] [PATCH 0/2] Add esed.eclass for sed that dies if caused no changes by Ionen Wolkens
1 Hi,
2
3 On 2022/05/31 16:29, Ionen Wolkens wrote:
4 > esed does bring back the -i/die skipping but that's not its inherent
5 > purpose and GNU sed currently does not support a mean to report if
6 > changes occurred (if this happens, esed may well become obsolete too).
7 >
8 Haven't checked the code to validate.  But I'm in support of esed eclass
9 for the sole reason it ensures the sed actually still changes
10 something.  Not that it verifies the change is actually intended mind
11 you, so it doesn't completely take away the due diligence checks, but
12 the verbose options should help devs to ensure the changes are the
13 intended at testing time.
14
15 One *could* also add a change-counter check, eg, count the number of
16 lines starting with + and - (but not +++ and ---) from diff, and ensure
17 they match the expected count.  Just to catch further possible cases.
18
19 Kind Regards,
20 Jaco