Skip to content

refactor: Fix RPM metadata Group field rendering "<nil>" in primary.xml#14

Merged
frostyardyeti[bot] merged 1 commit intomainfrom
yeti/improve-c1ca
Mar 27, 2026
Merged

refactor: Fix RPM metadata Group field rendering "<nil>" in primary.xml#14
frostyardyeti[bot] merged 1 commit intomainfrom
yeti/improve-c1ca

Conversation

@frostyardyeti
Copy link
Copy Markdown

@frostyardyeti frostyardyeti bot commented Mar 27, 2026

In internal/generator/rpm/generator.go:303, the Group field is set via fmt.Sprintf("%v", pkg.Metadata["Group"]). When the Group key is absent from the metadata map (which happens for RPM packages that don't specify a group), this evaluates to the literal string "<nil>" in the generated XML. This produces invalid RPM metadata. Fix by using a type assertion with a fallback: if g, ok := pkg.Metadata["Group"].(string); ok { ... }, similar to how Release and BuildTime are handled on lines 263-269 of the same file.


Automated improvement by yeti improvement-identifier

…ry.xml

When the Group key is absent from a package's metadata map,
fmt.Sprintf("%v", nil) produces the literal string "<nil>" in the
generated XML. Use a type assertion with empty string fallback,
matching the existing pattern for Release and BuildTime fields.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@frostyardyeti frostyardyeti bot merged commit f1f932e into main Mar 27, 2026
1 check passed
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.

2 participants