public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Hannes Laimer <h.laimer@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH proxmox-datacenter-manager 1/1] remote_updates: fix update info mapper
Date: Wed,  8 Oct 2025 09:31:07 +0200	[thread overview]
Message-ID: <20251008073107.102213-3-h.laimer@proxmox.com> (raw)
In-Reply-To: <20251008073107.102213-1-h.laimer@proxmox.com>

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@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



_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


      parent reply	other threads:[~2025-10-08  7:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-08  7:31 [pdm-devel] [PATCH proxmox/proxmox-datacenter-manager 0/2] update PVE API spec and fix affected code Hannes Laimer
2025-10-08  7:31 ` [pdm-devel] [PATCH proxmox 1/1] pve-api: update spec Hannes Laimer
2025-10-08  8:23   ` Hannes Laimer
2025-10-08  7:31 ` Hannes Laimer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251008073107.102213-3-h.laimer@proxmox.com \
    --to=h.laimer@proxmox.com \
    --cc=pdm-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal