all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH proxmox{-backup,-datacenter-manager} v2 0/2] fix #7746: cli: show installed instead of candidate version
@ 2026-10-02  7:09 Erik Fastermann
  2026-10-02  7:09 ` [PATCH proxmox-backup v2 1/2] fix #7746: cli: manager: " Erik Fastermann
  2026-10-02  7:10 ` [PATCH proxmox-datacenter-manager v2 2/2] fix #7746: cli: admin: " Erik Fastermann
  0 siblings, 2 replies; 4+ messages in thread
From: Erik Fastermann @ 2026-10-02  7:09 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.

Changes since v1:
* Rebased onto the current master branches
* Renamed column header to 'Version' as suggested by Thomas with an
  updated commit message (thanks!)
* Added Christian's Reviewed-by/Tested-by trailers (thanks!)


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.12.1




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH proxmox-backup v2 1/2] fix #7746: cli: manager: show installed instead of candidate version
  2026-10-02  7:09 [PATCH proxmox{-backup,-datacenter-manager} v2 0/2] fix #7746: cli: show installed instead of candidate version Erik Fastermann
@ 2026-10-02  7:09 ` Erik Fastermann
  2026-10-02  7:10 ` [PATCH proxmox-datacenter-manager v2 2/2] fix #7746: cli: admin: " Erik Fastermann
  1 sibling, 0 replies; 4+ messages in thread
From: Erik Fastermann @ 2026-10-02  7:09 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.

The header is not shown while 'noborder' is set, as the table formatter
then suppresses headers as well. Still label it 'Version' rather than
'Old Version', as from the user's point of view it is the current
version, and the label stays correct should the borders ever be enabled.

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.

Reviewed-by: Christian Ebner <c.ebner@proxmox.com>
Tested-by: Christian Ebner <c.ebner@proxmox.com>
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..46bbc514c 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("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] 4+ messages in thread

* [PATCH proxmox-datacenter-manager v2 2/2] fix #7746: cli: admin: show installed instead of candidate version
  2026-10-02  7:09 [PATCH proxmox{-backup,-datacenter-manager} v2 0/2] fix #7746: cli: show installed instead of candidate version Erik Fastermann
  2026-10-02  7:09 ` [PATCH proxmox-backup v2 1/2] fix #7746: cli: manager: " Erik Fastermann
@ 2026-10-02  7:10 ` Erik Fastermann
  2026-10-02  8:48   ` applied: " Lukas Wagner
  1 sibling, 1 reply; 4+ messages in thread
From: Erik Fastermann @ 2026-10-02  7:10 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.

The header is not shown while 'noborder' is set, as the table formatter
then suppresses headers as well. Still label it 'Version' rather than
'Old Version', as from the user's point of view it is the current
version, and the label stays correct should the borders ever be enabled.

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.

Reviewed-by: Christian Ebner <c.ebner@proxmox.com>
Tested-by: Christian Ebner <c.ebner@proxmox.com>
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 a2c5c623..9c0bc9ba 100644
--- a/cli/admin/src/main.rs
+++ b/cli/admin/src/main.rs
@@ -112,7 +112,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("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] 4+ messages in thread

* applied: [PATCH proxmox-datacenter-manager v2 2/2] fix #7746: cli: admin: show installed instead of candidate version
  2026-10-02  7:10 ` [PATCH proxmox-datacenter-manager v2 2/2] fix #7746: cli: admin: " Erik Fastermann
@ 2026-10-02  8:48   ` Lukas Wagner
  0 siblings, 0 replies; 4+ messages in thread
From: Lukas Wagner @ 2026-10-02  8:48 UTC (permalink / raw)
  To: Erik Fastermann, pbs-devel, pdm-devel

On Fri Oct 2, 2026 at 9:10 AM CEST, Erik Fastermann wrote:
> 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.
>
> The header is not shown while 'noborder' is set, as the table formatter
> then suppresses headers as well. Still label it 'Version' rather than
> 'Old Version', as from the user's point of view it is the current
> version, and the label stays correct should the borders ever be enabled.
>
> 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.
>
> Reviewed-by: Christian Ebner <c.ebner@proxmox.com>
> Tested-by: Christian Ebner <c.ebner@proxmox.com>
> Signed-off-by: Erik Fastermann <e.fastermann@proxmox.com>

applied the PDM patch, thanks!




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-02  8:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-02  7:09 [PATCH proxmox{-backup,-datacenter-manager} v2 0/2] fix #7746: cli: show installed instead of candidate version Erik Fastermann
2026-10-02  7:09 ` [PATCH proxmox-backup v2 1/2] fix #7746: cli: manager: " Erik Fastermann
2026-10-02  7:10 ` [PATCH proxmox-datacenter-manager v2 2/2] fix #7746: cli: admin: " Erik Fastermann
2026-10-02  8:48   ` applied: " Lukas Wagner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal