[PR #26] [MERGED] Don't add empty arrays to the RPM metadata. #177

Closed
opened 2026-01-29 16:31:02 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/quamotion/dotnet-packaging/pull/26
Author: @qmfrederik
Created: 10/13/2017
Status: Merged
Merged: 10/13/2017
Merged by: @qmfrederik

Base: masterHead: fixes/rhel


📝 Commits (1)

  • 4140827 Don't add empty arrays to the RPM metadata.

📊 Changes

1 file changed (+29 additions, -29 deletions)

View changed files

📝 Packaging.Targets/Rpm/RpmMetadata.cs (+29 -29)

📄 Description

Newer versions of RPM don't like arrays with a length of 0 in the metadata. Instead:

  • When attempting to add an array with length 0, remove the key from metadata alltogether
  • When attempting to read a value which doesn't exist in metadata, always return default(T).

We'd hit this issue when writing, for example, file dependencies - we register none for .NET packages, so this would generate empty arrays.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/quamotion/dotnet-packaging/pull/26 **Author:** [@qmfrederik](https://github.com/qmfrederik) **Created:** 10/13/2017 **Status:** ✅ Merged **Merged:** 10/13/2017 **Merged by:** [@qmfrederik](https://github.com/qmfrederik) **Base:** `master` ← **Head:** `fixes/rhel` --- ### 📝 Commits (1) - [`4140827`](https://github.com/quamotion/dotnet-packaging/commit/41408270cf0c2ac0b2c822a6f805f38a46054f53) Don't add empty arrays to the RPM metadata. ### 📊 Changes **1 file changed** (+29 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `Packaging.Targets/Rpm/RpmMetadata.cs` (+29 -29) </details> ### 📄 Description Newer versions of RPM don't like arrays with a length of 0 in the metadata. Instead: - When attempting to add an array with length 0, remove the key from metadata alltogether - When attempting to read a value which doesn't exist in metadata, always return default(T). We'd hit this issue when writing, for example, file dependencies - we register none for .NET packages, so this would generate empty arrays. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 16:31:02 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/dotnet-packaging#177