[pdm-devel] [PATCH proxmox-datacenter-manager 1/1] remote_updates: fix update info mapper

Hannes Laimer h.laimer at proxmox.com
Wed Oct 8 09:31:07 CEST 2025


With new PVE API spec we now have an enum for the arch field in the
AptUpdateInfo struct. The PDM equivalent however does not, this fixes
the mapping from the PVE one to the PDM one.

Signed-off-by: Hannes Laimer <h.laimer at proxmox.com>
---
 server/src/remote_updates.rs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/server/src/remote_updates.rs b/server/src/remote_updates.rs
index f833062..ed26b11 100644
--- a/server/src/remote_updates.rs
+++ b/server/src/remote_updates.rs
@@ -77,7 +77,10 @@ fn map_pve_update_info(info: pve_api_types::AptUpdateInfo) -> APTUpdateInfo {
     APTUpdateInfo {
         package: info.package,
         title: info.title,
-        arch: info.arch,
+        arch: info.arch.to_string(), // TODO: we get an enum from the PVE API, we should probably
+        // also have one here. Ideally they'd share the same. Or we use the APTUpdateInfo directly
+        // when generating the PVE API types, assuming we can teach the generator to consider
+        // existing types it did not define itself.
         description: info.description,
         version: info.version,
         old_version: info.old_version.unwrap_or_default(),
-- 
2.47.3





More information about the pdm-devel mailing list