From: Aaron Lauterer <a.lauterer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager v1 3/3] pveceph: print repo metadata when installing from manual
Date: Wed, 28 May 2025 18:46:30 +0200 [thread overview]
Message-ID: <20250528164630.2204379-3-a.lauterer@proxmox.com> (raw)
In-Reply-To: <20250528164630.2204379-1-a.lauterer@proxmox.com>
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>
---
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.
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 bff7ba70..4cf5ff27 100755
--- a/PVE/CLI/pveceph.pm
+++ b/PVE/CLI/pveceph.pm
@@ -223,7 +223,6 @@ __PACKAGE__->register_method ({
};
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'};
@@ -231,6 +230,12 @@ __PACKAGE__->register_method ({
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 = qw(apt-get --no-install-recommends -o Dpkg::Options::=--force-confnew install --);
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-05-28 16:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-28 16:46 [pve-devel] [PATCH manager v1 1/3] fix #5244 pveceph: install: add new repository for offline installation Aaron Lauterer
2025-05-28 16:46 ` [pve-devel] [PATCH manager v1 2/3] ui: CephInstallWizard: add option and hint for offline repository Aaron Lauterer
2025-05-28 16:46 ` Aaron Lauterer [this message]
2025-07-14 8:40 ` [pve-devel] [PATCH manager v1 1/3] fix #5244 pveceph: install: add new repository for offline installation Aaron Lauterer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250528164630.2204379-3-a.lauterer@proxmox.com \
--to=a.lauterer@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal