From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 397F81FF17E for ; Thu, 27 Nov 2025 11:45:11 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id AB1D51FFF0; Thu, 27 Nov 2025 11:45:31 +0100 (CET) From: Lukas Wagner To: pdm-devel@lists.proxmox.com Date: Thu, 27 Nov 2025 11:44:35 +0100 Message-ID: <20251127104447.162951-7-l.wagner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251127104447.162951-1-l.wagner@proxmox.com> References: <20251127104447.162951-1-l.wagner@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1764240256884 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.032 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pdm-devel] [PATCH datacenter-manager 01/13] pdm-api-types: reuse APTUpdateInfo from proxmox_apt_api_types X-BeenThere: pdm-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Datacenter Manager development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pdm-devel-bounces@lists.proxmox.com Sender: "pdm-devel" ... instead of defining of defining our own version locally. Both structs are equivalent, with the exception of `change_log_url`, which was present in the pdm-api-types version but not in the struct definition in proxmox-apt-api-types. We never seem to use this member (grepped PBS as well as PDM source), so it should be fine to use the definition without it - it also still compiles fine. Signed-off-by: Lukas Wagner --- lib/pdm-api-types/Cargo.toml | 1 + lib/pdm-api-types/src/lib.rs | 32 ++------------------------------ 2 files changed, 3 insertions(+), 30 deletions(-) diff --git a/lib/pdm-api-types/Cargo.toml b/lib/pdm-api-types/Cargo.toml index ffc75cf3..67476271 100644 --- a/lib/pdm-api-types/Cargo.toml +++ b/lib/pdm-api-types/Cargo.toml @@ -16,6 +16,7 @@ serde_plain.workspace = true proxmox-acme-api.workspace = true proxmox-access-control.workspace = true proxmox-auth-api = { workspace = true, features = ["api-types"] } +proxmox-apt-api-types.workspace = true proxmox-lang.workspace = true proxmox-config-digest.workspace = true proxmox-schema = { workspace = true, features = ["api-macro"] } diff --git a/lib/pdm-api-types/src/lib.rs b/lib/pdm-api-types/src/lib.rs index 666f89e1..5bce1b07 100644 --- a/lib/pdm-api-types/src/lib.rs +++ b/lib/pdm-api-types/src/lib.rs @@ -32,6 +32,8 @@ pub use proxy::HTTP_PROXY_SCHEMA; mod translation; pub use translation::Translation; +pub use proxmox_apt_api_types::APTUpdateInfo; + pub use proxmox_auth_api::types::{Authid, Userid}; pub use proxmox_auth_api::types::{Realm, RealmRef}; pub use proxmox_auth_api::types::{Tokenname, TokennameRef}; @@ -200,36 +202,6 @@ pub const PASSWORD_HINT_SCHEMA: Schema = StringSchema::new("Password hint.") .max_length(64) .schema(); -#[api()] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(rename_all = "PascalCase")] -/// Describes a package for which an update is available. -pub struct APTUpdateInfo { - /// Package name - pub package: String, - /// Package title - pub title: String, - /// Package architecture - pub arch: String, - /// Human readable package description - pub description: String, - /// New version to be updated to - pub version: String, - /// Old version currently installed - pub old_version: String, - /// Package origin - pub origin: String, - /// Package priority in human-readable form - pub priority: String, - /// Package section - pub section: String, - /// URL under which the package's changelog can be retrieved - pub change_log_url: String, - /// Custom extra field for additional package information - #[serde(skip_serializing_if = "Option::is_none")] - pub extra_info: Option, -} - #[api()] #[derive(Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "lowercase")] -- 2.47.3 _______________________________________________ pdm-devel mailing list pdm-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel