On 2025-07-14 10:45, Shannon Sterz wrote:
On Mon Jul 14, 2025 at 10:38 AM CEST, Aaron Lauterer wrote:
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.laute...@proxmox.com>
---
Notes:
I intially tried to get the repo definition similar to how it is in the
.list file and printed by apt-cache policy {package} but failed so far,
getting that info via AptPkg::Cache. Therefore, I used what I found so far.
changes since v1:
* rebased to new indentation
PVE/CLI/pveceph.pm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/PVE/CLI/pveceph.pm b/PVE/CLI/pveceph.pm
index a949582e..04c16199 100755
--- a/PVE/CLI/pveceph.pm
+++ b/PVE/CLI/pveceph.pm
@@ -240,7 +240,6 @@ EOF
};
if ($repo eq "manual") {
- # TODO: get used repo metadata and print it as additional info
nit: you add this comment in the first patch of the series just to
remove it again here. might want to clean that up if another version of
this series is necessary.
My intention here was that I am not sure if we actually want to use
patch 3, as it only adds informational output, but is not strictly
necessary. So if we don't use patch3, we still have the TODO around :)>
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 =
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel