From: Shannon Sterz <s.sterz@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH proxmox v2 1/1] upgrade-checks: fix meta package version check
Date: Mon, 24 Nov 2025 11:34:42 +0100 [thread overview]
Message-ID: <20251124103444.117406-3-s.sterz@proxmox.com> (raw)
In-Reply-To: <20251124103444.117406-2-s.sterz@proxmox.com>
old_version is an optional value, so adapt to this new reality.
Originally-by: Stefan Hanreich <s.hanreich@proxmox.com>
Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
proxmox-upgrade-checks/src/lib.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/proxmox-upgrade-checks/src/lib.rs b/proxmox-upgrade-checks/src/lib.rs
index 4f76555a..f9b66876 100644
--- a/proxmox-upgrade-checks/src/lib.rs
+++ b/proxmox-upgrade-checks/src/lib.rs
@@ -202,9 +202,9 @@ impl UpgradeChecker {
.iter()
.find(|pkg| pkg.package.as_str() == self.meta_package_name);
- if let Some(meta_pkg) = meta_pkg {
+ if let Some(old_version) = meta_pkg.and_then(|m| m.old_version.as_ref()) {
let pkg_version = Regex::new(r"^(\d+)\.(\d+)[.-](\d+)")?;
- let captures = pkg_version.captures(&meta_pkg.old_version);
+ let captures = pkg_version.captures(old_version);
if let Some(captures) = captures {
let maj = Self::extract_version_from_captures(1, &captures)?;
let min = Self::extract_version_from_captures(2, &captures)?;
--
2.47.3
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
next prev parent reply other threads:[~2025-11-24 10:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-24 10:34 [pdm-devel] [PATCH datacenter-manager/proxmox{, -backup} v2 0/4] move upgrade checks to a common crate under proxmox-rs Shannon Sterz
2025-11-24 10:34 ` Shannon Sterz [this message]
2025-11-24 10:34 ` [pdm-devel] [PATCH proxmox-backup v2 1/2] pbs3to4: move pbs3to4 to common proxmox-upgrade-checks crate Shannon Sterz
2025-11-24 10:34 ` [pdm-devel] [PATCH proxmox-backup v2 2/2] pbs2to3: remove now unused script Shannon Sterz
2025-11-24 10:34 ` [pdm-devel] [PATCH datacenter-manager v2 1/1] upgrade-checks: use common proxmox-upgrade-checks crate Shannon Sterz
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=20251124103444.117406-3-s.sterz@proxmox.com \
--to=s.sterz@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