Fix: trim RPM package names in DOT file visualization#380
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances RPM package visualization in DOT files by trimming package names to their base form, making them consistent with Debian package visualization.
Changes:
- Extract base package names from full RPM filenames (e.g., 'libgcrypt' from 'libgcrypt-1.10.3-1.azl3.x86_64.rpm')
- Apply name trimming to both node identifiers and labels in the DOT graph
- Apply the same trimming to dependency edges for consistency
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bf0751d to
953f7fb
Compare
magerstam
reviewed
Feb 5, 2026
- Extract base package names (e.g., 'libgcrypt' instead of 'libgcrypt-1.10.3-1.azl3.x86_64.rpm') - Apply extractBasePackageNameFromFile() to both node IDs and labels - Apply same trimming to dependency edges for consistency - Makes RPM dot files consistent with Debian packages for cleaner visualization - Dot file is visualization-only, does not affect build logic or package resolution
- Dependencies in pkg.Requires can be capability strings (e.g., 'libc.so.6(GLIBC_2.2.5)') - extractBaseRequirement() properly handles both capabilities and package requirements - Addresses Copilot review feedback
- Apply extractBasePackageNameFromFile() after extractBaseRequirement() - Ensures both capability strings and package filenames are trimmed - Dependencies now show clean names (e.g., 'filesystem' instead of 'filesystem-1.1-21.azl3.x86_64.rpm')
- Strip ALL parenthesized suffixes, not just ()(64bit) - Handles complex capability strings like libc.so.6(GLIBC_2.38)(64bit) - Fixes shadow-utils and openssh-server dependency visualization - Added documentation with examples - Added comment about duplicate node declarations
dd96769 to
7580d87
Compare
magerstam
approved these changes
Feb 6, 2026
Contributor
magerstam
left a comment
There was a problem hiding this comment.
Overall looks good. Let's make sure we think through whether we could have scenarios where pkgA version N --> N+1 could introduce new/additional differences
arodage
added a commit
that referenced
this pull request
Feb 10, 2026
…age-names-in-dot Fix: trim RPM package names in DOT file visualization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge Checklist
All boxes should be checked before merging the PR
Description
This PR improves the DOT file visualization for RPM package dependencies by trimming the version and architecture suffixes from package names, making dependency graphs more readable.
Changes:
internal/ospackage/rpmutils/resolver.goto trim.x86_64,.noarch,.aarch64and version strings from RPM package names in the DOT file outputkernelinstead ofkernel-6.6.35.1-5.azl3.x86_64)Impact:
Any Newly Introduced Dependencies
No new dependencies introduced.
How Has This Been Tested?
earthly +buildand verified cleaner package namesearthly +test-quick- all existing tests passsudo ./build/os-image-composer build image-templates/azl3-x86_64-minimal-raw.yml --dotfile azl3_raw.dot./scripts/dep-analyzer.sh -i azl3_raw.dot -r cloud-init -d 1 -t svg Rendered: azl3_raw_cloud-init_d1.svg