[Bug 257069] Improve error output from the do-depends.sh script

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 09 Jul 2021 01:01:04 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257069

            Bug ID: 257069
           Summary: Improve error output from the do-depends.sh script
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Ports Framework
          Assignee: portmgr@FreeBSD.org
          Reporter: sobomax@FreeBSD.org
                CC: ports-bugs@FreeBSD.org

Created attachment 226318
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=226318&action=edit
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  /usr/local/etc/php/ext-20-dba.ini
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
----

Versus before:
----
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  /usr/local/etc/php/ext-20-dba.ini
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
----

-- 
You are receiving this mail because:
You are on the CC list for the bug.