Ladislau 58f613fc87 Improve circular dependency error messages in build-pkgs
When build-pkgs encounters circular dependencies not covered by circular_dep.conf, error messages are incomprehensible and provide no actionable guidance for developers to resolve the issue.

This change improves error output by removing redundant logs, providing clear package identification, and adding step-by-step instructions for fixing circular dependencies.

build-tools/stx/dsc_depend.py - MODIFIED

Lines 770: Removed redundant DEBUG log
- Method: Circular_break.__get_one_circular_grp()
- Removed self.logger.debug('%s' % e) inside exception handler
- This debug message was redundant with more detailed error below
- Changes every execution even for same dependency chain (misleading)

Lines 802-813: Added actionable fix instructions
- Method: Circular_break.__dump_circular_dep()
- Line 802-808: Clear ERROR with package names instead of full paths
- Lines 809-813: Added 4 INFO lines with step-by-step fix instructions:
- Shows exact SRC SET format with detected packages
  - Alerts about potentially missing related packages
  - Instructs to analyze dependencies for BUILD ORDER
  - Directs to existing entries in file for reference

Lines 838: Removed redundant final ERROR
- Method: Circular_break.__grouping()
- Removed self.logger.error('There are unexpected circular dependency.')
- This message was redundant with detailed error already logged above

TEST PLAN

Scenario 1 - Reproduce circular dependency error (setuptools, wheel):
PASS: Removed 'setuptools wheel' entry from circular_dep.conf
PASS: Executed build-pkgs -p setuptools,wheel
PASS: Error triggered with new messages

Output BEFORE:
ERROR: Circular dependency member: /localdisk/.../setuptools...dsc.
DEBUG: CIRCULAR DEPENDENCY DETECTED.
ERROR: Circular dependency: {'/localdisk/.../setuptools...', '/localdisk/.../wheel...'}
ERROR: There are unexpected circular dependency.

Output AFTER (clear and actionable):
ERROR: Circular dependency detected in packages: setuptools, wheel
INFO: To fix, add an entry to build-tools/stx/circular_dep.conf:
INFO:   SRC SET: setuptools wheel [and possibly other related packages]
INFO:   BUILD ORDER: <analyze dependencies to determine correct order>
INFO: See existing entries in the file for reference

Closes-Bug: 2131021
Change-Id: If6f6c09ea214983410d8d014b63222bc9cd128f4
Signed-off-by: Ladislau <Ladislau.Felisbino@windriver.com>
2025-11-10 15:48:42 +00:00
2025-10-16 12:14:06 -03:00
2019-04-19 19:52:37 +00:00
2023-04-28 12:38:49 -04:00
2018-06-01 07:45:23 -07:00
2022-12-26 21:12:47 +00:00
Description
StarlingX build source tree root
14 MiB
Languages
Python 63.1%
Shell 35.3%
BitBake 1.1%
Dockerfile 0.5%