Skip to content

audit: Fix false path conflict for equivalent relative paths#291

Open
febyeji wants to merge 2 commits intopulp-platform:masterfrom
febyeji:fix/audit-path-canonicalize
Open

audit: Fix false path conflict for equivalent relative paths#291
febyeji wants to merge 2 commits intopulp-platform:masterfrom
febyeji:fix/audit-path-canonicalize

Conversation

@febyeji
Copy link
Copy Markdown

@febyeji febyeji commented Mar 23, 2026

bender audit reports a false path conflict when multiple packages reference the same directory via different relative paths (e.g., ip/common vs ../common).

This PR fixes the issue by:

  • Canonicalizing path dependencies before comparing sources in audit and parents commands.
  • Add format_dep_source() helper that resolves path dependencies relative to each package's root directory before formatting
  • Adding a regression test for the scenario described above

Fixes #290

- Canonicalize path dependencies before comparing sources in `audit` and
`parents` commands.
- Add `format_dep_source()` helper that resolves path dependencies relative
to each package's root directory before formatting
- Add regression test for the fix.

Fixes pulp-platform#290
@micprog micprog self-requested a review March 27, 2026 16:09
bender audit should return correctly, as it only provides information.
Add  bender parents to identify paths in case of conflict.
Copy link
Copy Markdown
Member

@micprog micprog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the quick fix and test! 👍

I added a bit more print to the test, but that is only in case there is a mismatch to gain some insight, should not happen.

@febyeji
Copy link
Copy Markdown
Author

febyeji commented Mar 28, 2026

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bender audit: false path conflict when multiple packages reference same directory via different relative paths

2 participants