]> git.proxmox.com Git - pve-manager.git/commitdiff
report: add `apt-cache policy` to list recognized APT sources
authorAlexander Zeidler <a.zeidler@proxmox.com>
Thu, 18 Apr 2024 09:16:46 +0000 (11:16 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 18 Apr 2024 20:26:59 +0000 (22:26 +0200)
with their details as well as pinned packages. Omit the "origin"
lines, as their value is already visible in the URLs.

 # apt-cache policy ...
 Package files:
  100 /var/lib/dpkg/status
      release a=now
  500 https://enterprise.proxmox.com/debian/pve bookworm/pve-enterprise amd64 Packages
      release o=Proxmox,a=stable,n=bookworm,l=Proxmox VE Enterprise Debian Repository,c=pve-enterprise,b=amd64
 ...
 Pinned packages:
      intel-microcode -> 3.20231114.1~deb12u1 with priority 1234

Signed-off-by: Alexander Zeidler <a.zeidler@proxmox.com>
PVE/Report.pm

index 4588b2daafd71e92a2c3b362b026171c13c4018e..9b6cd95cf5bed6e8c885dc5cb6e1b82d537c6994 100644 (file)
@@ -38,6 +38,7 @@ my $init_report_cmds = sub {
                'cat /etc/apt/sources.list',
                sub { dir2text('/etc/apt/sources.list.d/', '.+\.list') },
                sub { dir2text('/etc/apt/sources.list.d/', '.+\.sources') },
+               'apt-cache policy | grep -vP "^ +origin "',
                'lscpu',
                'pvesh get /cluster/resources --type node --output-format=yaml',
            ],