[pdm-devel] [PATCH datacenter-manager 01/13] pdm-api-types: reuse APTUpdateInfo from proxmox_apt_api_types
Lukas Wagner
l.wagner at proxmox.com
Thu Nov 27 11:44:35 CET 2025
... 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 <l.wagner at proxmox.com>
---
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<String>,
-}
-
#[api()]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
--
2.47.3
More information about the pdm-devel
mailing list