* [PATCH proxmox{-backup,-datacenter-manager} 0/2] fix #7746: cli: show installed instead of candidate version
@ 2026-07-27 13:59 Erik Fastermann
2026-07-27 13:59 ` [PATCH proxmox-backup 1/2] fix #7746: cli: manager: " Erik Fastermann
2026-07-27 13:59 ` [PATCH proxmox-datacenter-manager 2/2] fix #7746: cli: admin: " Erik Fastermann
0 siblings, 2 replies; 3+ messages in thread
From: Erik Fastermann @ 2026-07-27 13:59 UTC (permalink / raw)
To: pbs-devel, pdm-devel; +Cc: Erik Fastermann
The change is identical for PBS and PDM, see the commit messages for
the rationale. Could make sense to share some of this code with a
future refactor.
proxmox-backup:
Erik Fastermann (1):
fix #7746: cli: manager: show installed instead of candidate version
src/bin/proxmox-backup-manager.rs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
proxmox-datacenter-manager:
Erik Fastermann (1):
fix #7746: cli: admin: show installed instead of candidate version
cli/admin/src/main.rs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Summary over all repositories:
2 files changed, 10 insertions(+), 2 deletions(-)
--
Generated by murpp 0.11.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH proxmox-backup 1/2] fix #7746: cli: manager: show installed instead of candidate version
2026-07-27 13:59 [PATCH proxmox{-backup,-datacenter-manager} 0/2] fix #7746: cli: show installed instead of candidate version Erik Fastermann
@ 2026-07-27 13:59 ` Erik Fastermann
2026-07-27 13:59 ` [PATCH proxmox-datacenter-manager 2/2] fix #7746: cli: admin: " Erik Fastermann
1 sibling, 0 replies; 3+ messages in thread
From: Erik Fastermann @ 2026-07-27 13:59 UTC (permalink / raw)
To: pbs-devel, pdm-devel; +Cc: Erik Fastermann
The 'versions' command printed 'Version' from the API result, which
carries the version apt would upgrade to, not the one that is
installed. Whenever the apt cache knows a newer version, the command
therefore reported a version that is not installed at all, and the
output changed after a plain 'apt update'. This also affects the
'report' command, which runs 'versions --verbose'.
The installed version is available as 'OldVersion', which is what the
GUI reads as well. The name is unfortunate for a listing of installed
packages, but as far as I can tell every other consumer uses it
correctly. The only exceptions were this command and its equivalent in
Proxmox Datacenter Manager, which is fixed in a separate patch.
Use a renderer for the column, as 'OldVersion' is not set for packages
that are not installed, where the table would otherwise show an empty
cell instead of 'unknown', matching the previous behavior. As the
header is not shown with 'noborder' set to true, renaming the field has
no user-visible effect.
The naming is inherited from PVE, where the same record is used for
both the available updates and the installed package listing. Giving
the versions endpoint its own type would avoid the trap for future
callers, but that is a more complex API change and can be done in a
future commit.
Signed-off-by: Erik Fastermann <e.fastermann@proxmox.com>
---
src/bin/proxmox-backup-manager.rs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/bin/proxmox-backup-manager.rs b/src/bin/proxmox-backup-manager.rs
index 86bfae44f..e42567d39 100644
--- a/src/bin/proxmox-backup-manager.rs
+++ b/src/bin/proxmox-backup-manager.rs
@@ -649,7 +649,11 @@ async fn get_versions(verbose: bool, param: Value) -> Result<Value, Error> {
.disable_sort()
.noborder(true) // just not helpful for version info which gets copy pasted often
.column(ColumnConfig::new("Package"))
- .column(ColumnConfig::new("Version"))
+ .column(
+ ColumnConfig::new("OldVersion")
+ .header("Old Version")
+ .renderer(|value, _record| Ok(value.as_str().unwrap_or("unknown").to_string())),
+ )
.column(ColumnConfig::new("ExtraInfo").header("Extra Info"));
let return_type = &crate::api2::node::apt::API_METHOD_GET_VERSIONS.returns;
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH proxmox-datacenter-manager 2/2] fix #7746: cli: admin: show installed instead of candidate version
2026-07-27 13:59 [PATCH proxmox{-backup,-datacenter-manager} 0/2] fix #7746: cli: show installed instead of candidate version Erik Fastermann
2026-07-27 13:59 ` [PATCH proxmox-backup 1/2] fix #7746: cli: manager: " Erik Fastermann
@ 2026-07-27 13:59 ` Erik Fastermann
1 sibling, 0 replies; 3+ messages in thread
From: Erik Fastermann @ 2026-07-27 13:59 UTC (permalink / raw)
To: pbs-devel, pdm-devel; +Cc: Erik Fastermann
The 'versions' command printed 'Version' from the API result, which
carries the version apt would upgrade to, not the one that is
installed. Whenever the apt cache knows a newer version, the command
therefore reported a version that is not installed at all, and the
output changed after a plain 'apt update'. This also affects the
'report' command, which runs 'versions --verbose'.
The installed version is available as 'OldVersion', which is what the
GUI reads as well. The name is unfortunate for a listing of installed
packages, but as far as I can tell every other consumer uses it
correctly. The only exceptions were this command and its equivalent in
Proxmox Backup Server, which is fixed in a separate patch.
Use a renderer for the column, as 'OldVersion' is not set for packages
that are not installed, where the table would otherwise show an empty
cell instead of 'unknown', matching the previous behavior. As the
header is not shown with 'noborder' set to true, renaming the field has
no user-visible effect.
The naming is inherited from PVE, where the same record is used for
both the available updates and the installed package listing. Giving
the versions endpoint its own type would avoid the trap for future
callers, but that is a more complex API change and can be done in a
future commit.
Signed-off-by: Erik Fastermann <e.fastermann@proxmox.com>
---
cli/admin/src/main.rs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/cli/admin/src/main.rs b/cli/admin/src/main.rs
index 3102694e..71cd7fa4 100644
--- a/cli/admin/src/main.rs
+++ b/cli/admin/src/main.rs
@@ -110,7 +110,11 @@ async fn get_versions(verbose: bool, param: Value) -> Result<Value, anyhow::Erro
.disable_sort()
.noborder(true) // just not helpful for version info which gets copy pasted often
.column(ColumnConfig::new("Package"))
- .column(ColumnConfig::new("Version"))
+ .column(
+ ColumnConfig::new("OldVersion")
+ .header("Old Version")
+ .renderer(|value, _record| Ok(value.as_str().unwrap_or("unknown").to_string())),
+ )
.column(ColumnConfig::new("ExtraInfo").header("Extra Info"));
let return_type = &server::api::nodes::apt::API_METHOD_GET_VERSIONS.returns;
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-07-27 14:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-27 13:59 [PATCH proxmox{-backup,-datacenter-manager} 0/2] fix #7746: cli: show installed instead of candidate version Erik Fastermann
2026-07-27 13:59 ` [PATCH proxmox-backup 1/2] fix #7746: cli: manager: " Erik Fastermann
2026-07-27 13:59 ` [PATCH proxmox-datacenter-manager 2/2] fix #7746: cli: admin: " Erik Fastermann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox