mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-09-10 19:46:24 +00:00
fix(genimage): take the netboot mirror from the ports archive off amd64
archive.ubuntu.com publishes amd64 and i386 only, so debootstrap could not find a single package for a ppc64el or riscv64 netboot image and genimage failed on every architecture except x86. The default mirror is now the ports archive for those architectures. site.ubuntu_apt_mirror still overrides it, for a local mirror that serves every architecture. Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com>
This commit is contained in:
@@ -259,8 +259,13 @@ unless ($onlyinitrd) {
|
||||
# site.ubuntu_apt_mirror overrides; otherwise default to the public archive. A live-server
|
||||
# ISO is never a complete debootstrap source, so a real mirror is always required here.
|
||||
my @aptmirror = xCAT::TableUtils->get_site_attribute("ubuntu_apt_mirror");
|
||||
# archive.ubuntu.com publishes amd64 and i386 only. Every other architecture, ppc64el
|
||||
# and riscv64 included, is on the ports archive.
|
||||
my $default = ($uarch =~ /^(?:amd64|i386)$/)
|
||||
? 'http://archive.ubuntu.com/ubuntu'
|
||||
: 'http://ports.ubuntu.com/ubuntu-ports';
|
||||
my $mirror = (defined $aptmirror[0] && length $aptmirror[0])
|
||||
? $aptmirror[0] : 'http://archive.ubuntu.com/ubuntu';
|
||||
? $aptmirror[0] : $default;
|
||||
(my $codename = $osver) =~ s/^ubuntu//;
|
||||
# Strip ONLY a trailing third component. A bare s/\.\d+$// also strips the minor from a
|
||||
# two-part osvers (ubuntu26.04 -> "26"), which misses the %cn map below and reaches
|
||||
|
||||
Reference in New Issue
Block a user