media-autobuild_suite icon indicating copy to clipboard operation
media-autobuild_suite copied to clipboard

List of patches which could not be applied + ANSI stripping

Open LigH-de opened this issue 2 years ago • 4 comments

2022-06-05

curl

  • 0003-libpsl-static-libs.patch

ffmpeg

  • master-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch

BTW: How can I strip the compile.log off of ANSI color codes when the suite finished successfully? Usually it only creates stripped log files when something failed.

LigH-de avatar Jun 05 '22 21:06 LigH-de

You could probably run strip_ansi "$LOCALBUILDDIR"/*.log in mintty

1480c1 avatar Jun 05 '22 21:06 1480c1

Which requires a previous source "$LOCALBUILDDIR"/media-suite_helper.sh in an interactive console. But yes, it works, thanks.


Wait, not really ... this is incomplete. It does not filter Esc (B. I wonder where to report this. Seems to be a simple sed substitute, so adding ( to the first group might be sufficient. I guess.


No, it's more complex. Might need an escape? And Esc ]0 gets missed too, in the substitution.

LigH-de avatar Jun 06 '22 12:06 LigH-de

Could you make a list of all the escapes that manages to escape? Also, try escaping them with backticks to ensure they don't get formatted

1480c1 avatar Jun 06 '22 19:06 1480c1

So far I only found the patterns (B and ]0; to be missed (may be due to the option to allow bold fonts on the console). Here a short log from a run which was supposed to compile only uvg266.

compile.log compile.stripped.log

I tried to escape ( and ] with backslashes in the replace string, as I found discussed in the web, but that did not create the desired results.

LigH-de avatar Jun 06 '22 20:06 LigH-de

I created a file build/post_suite.sh to test some RegEx substitutions, and this appears to work for me:

#!/bin/bash
sed -r "s/\x1b[[(][0-9;?]*[a-zA-Z]|\x1b\][0-9];//g" compile.log > compile.stripped.log

I learned that [ and ( need no escape when they are inside a [list]. Thanks to the GNU sed live editor! 😄

Your choice whether you want to integrate it.

LigH-de avatar Apr 17 '23 10:04 LigH-de

changes added as 06070a399bf1846e3a01c7bc5f931fcea112ba1a

1480c1 avatar Jun 29 '23 20:06 1480c1