From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id B8BE41FF0A3 for ; Thu, 01 Oct 2026 15:57:51 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 05FF12170D; Thu, 01 Oct 2026 15:57:51 +0200 (CEST) Message-ID: <1b81c62a-1591-4663-89ed-c31b16846757@proxmox.com> Date: Thu, 1 Oct 2026 15:57:45 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH proxmox-backup 1/2] fix #7746: cli: manager: show installed instead of candidate version To: Erik Fastermann , pbs-devel@lists.proxmox.com, pdm-devel@lists.proxmox.com References: <20260727135940.267321-1-e.fastermann@proxmox.com> <20260727135940.267321-2-e.fastermann@proxmox.com> Content-Language: en-US From: Thomas Lamprecht In-Reply-To: <20260727135940.267321-2-e.fastermann@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1790863066071 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.667 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 2BQOTTJQWRPVOW5XR5BDXJPZRWIMQ6BY X-Message-ID-Hash: 2BQOTTJQWRPVOW5XR5BDXJPZRWIMQ6BY X-MailFrom: t.lamprecht@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Am 27.07.26 um 15:59 schrieb 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 > --- > 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 { > .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") old version might be correct from apt/API POV, but IMO slightly confusing from a user POV, as it's the current version (or well just version, a new one should be differentiated here to "Available Version" or so). But as headers are hidden here (we only hide borders, but proxmox-router then always hides the headers too), this doesn't matter much now, might bite users if one changes hiding the border though. > + .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; >