[pve-devel] [PATCH manager 3/9] report: add list of upgradable packages
Thomas Lamprecht
t.lamprecht at proxmox.com
Mon Mar 25 09:02:08 CET 2024
On 22/03/2024 14:59, Alexander Zeidler wrote:
> * to easily see if APT already knows about old packages in use and
> their exact version
> * to reconsider asking for applying updates as a first recommendation
> if the list is empty and no updates have been released very recently
>
> # apt list --upgradable ...
> Listing...
> pve-manager testing 8.1.6 amd64 [upgradable from: 8.1.4]
>
> Signed-off-by: Alexander Zeidler <a.zeidler at proxmox.com>
> ---
> PVE/Report.pm | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/PVE/Report.pm b/PVE/Report.pm
> index 6014f13e..ad5c2aa0 100644
> --- a/PVE/Report.pm
> +++ b/PVE/Report.pm
> @@ -36,6 +36,7 @@ my $init_report_cmds = sub {
> 'cat /etc/hosts',
> 'pvesubscription get',
> 'cat /etc/pve/jobs.cfg',
> + 'apt list --upgradable 2>/dev/null | sed "s/\//\t/g" | column -tL',
this can easily add a few 100s KiB of text to the report on major upgrades,
this is just to verbose for an initial report.
I'd rather add just the count of available upgrades, i.e. lie `apt update`
does, which allows you to draw similar conclusions without bloating the
report to unwieldy sizes.
Maybe we could even add that info to the pveversion --verbose output,
as then it'd be already included here and also help on other channels
like the forum.
> 'cat /etc/apt/sources.list',
> sub { dir2text('/etc/apt/sources.list.d/', '.+\.list') },
> sub { dir2text('/etc/apt/sources.list.d/', '.+\.sources') },
More information about the pve-devel
mailing list