Created attachment 226318 [details]
Patch to improve error output.
When resolving dependencies do-depends.sh currently emits error(s) and sets a flag, but proceeds traversing the dependency chain. As a result, the error(s) is/are potentially burried in megabytes of other output. With this patch, the script would accumulate all errors and output them at the end of the script providing a nice summary and direction on how to fix.
00:24:51.853 ===> ssp-5.4.9b6ccea87_1 depends on file: /usr/local/lib/php/20190902/dba.so - found
00:24:51.853 ===> Returning to build of ssp-5.4.9b6ccea87_1
00:24:51.853 Found 1 error(s) with dependencies:
00:24:51.853 Error #1: a dependency refers to a non existing origin: /media/net/opensips31 in RUN_DEPENDS
00:24:51.853 *** Error code 1
00:12:50.614 ===> ssp-5.4.9b6ccea87_1 depends on file: /usr/local/sbin/opensips31 - not found
00:12:50.614 Error a dependency refers to a non existing origin: /media/net/opensips31 in RUN_DEPENDS
00:12:50.614 ===> ssp-5.4.9b6ccea87_1 depends on file: /usr/local/sbin/codecd - not found
[thousands of lines skipped]
00:24:43.113 ===> ssp-5.4.9b6ccea87_1 depends on file: /usr/local/lib/php/20190902/dba.so - found
00:24:43.113 ===> Returning to build of ssp-5.4.9b6ccea87_1
00:24:43.113 Errors with dependencies.
00:24:43.113 *** Error code 1
I've personally encountered this scenario more times than I can count. A solution like this makes the ports process seem much less opaque.
I wonder if this is an opportunity for a general error-message accumulator. Would this paradigm make sense for more than just do-depends?
Adam, maybe it would however I cannot think of any other place where it might be useful. I suggest making one step at a time by taking this patch and generalizing on it later if the need arises.