timo.my...@bittivirhe.fi (Timo Myyrä) writes:

> Klemens Nanni <k...@posteo.org> writes:
>
>> On Sat, Jan 13, 2018 at 12:08:25AM +0200, Timo Myyrä wrote:
>>>  pre-patch:
>>>     find ${WRKSRC} -type f | \
>>> -           xargs sed -i 's,^JAR =.*,JAR = ${JAVA_HOME}/bin/jar,g'
>>> +           xargs fgrep -l "JAR =" | \
>>> +           xargs sed -i 's,^JAR =.*,JAR = ${JAVA_HOME}/bin/jar,g'; \
>> That seems overly complicated to me. find can do what xargs does here,
>> running two xargs just makes it worse and after all there's no need for
>> grep. Since you'll encounter only one "JAR =..." assignment per line,
>> sed's `g' flag can be dropped as well.
>>
>> Might be nitpicking but how about this (untested):
>>
>>      find ${WRKSRC} -type f -exec \
>>              sed -i '/^JAR =/s,=.*,= ${JAVA_HOME}/bin/jar,' {} +
>
> I recall that there was some build issue which was solved this. The previous
> version was similar than you have.
>
> timo

Didn't find the discussion about the build error but IIRC the first version of
the command updated the file access times which made the make re-compile files
and this somehow didn't work. Thats why there's a bit more complex command to
patch the files.

Timo

Reply via email to