pveceph: print repo metadata when installing from manual

By printing the site and component, the person installing it manuall has
a final check to see if the correct repository is being used.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Link: https://lore.proxmox.com/20250714083838.68483-3-a.lauterer@proxmox.com
This commit is contained in:
Aaron Lauterer 2025-07-14 10:38:38 +02:00 committed by Thomas Lamprecht
parent 435004aad4
commit e5b2f19060

View file

@ -240,7 +240,6 @@ EOF
};
if ($repo eq "manual") {
# TODO: get used repo metadata and print it as additional info
my $apt_cache = AptPkg::Cache->new() || die "unable to initialize AptPkg::Cache\n";
my @ceph_versions = $apt_cache->{'ceph-common:amd64'}->{'VersionList'}->@*;
my $latest_available = $ceph_versions[0]->{'VerStr'};
@ -250,6 +249,12 @@ EOF
die
"Selected Ceph version '${selected_version}' does not match the available version in the repository '${latest_available}' \n"
if ($latest_available !~ "^$selected_version");
my $pkg_infos = $ceph_versions[0]->{'FileList'}->[0]->{'File'};
print "\nUsing the following manual repository:\n"
. "Site:\t\t $pkg_infos->{'Site'}\n"
. "Component:\t $pkg_infos->{'Component'}\n\n";
}
my @apt_install =