mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-09-25 01:04:05 +00:00
test(xcat-core): the Ubuntu ppc64le install drops the bootloader package
The Subiquity apt configuration sets APT::Install-Recommends "false" for every architecture. On ppc64el the target gets grub-ieee1275 only as a recommended package of the kernel image, so the setting removes it and curtin fails. The test renders the apt block for osarch ppc64el, online and offline, and requires that it does not disable the recommended packages. Both assertions fail before the fix. Evidence: reg_linux_diskfull_installation_flat on Ubuntu 24.04 ppc64le, xcat-core-devel-ubuntu-cd build 122, cluster xcat25. curtin-install.log: "dpkg-query: package 'grub-ieee1275' is not installed", from ['unshare', '--fork', '--pid', '--mount-proc=/target/proc', '--', 'chroot', '/target', 'dpkg-reconfigure', 'grub-ieee1275']. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
This commit is contained in:
@@ -193,8 +193,21 @@ is( $render->( $pkglist, environvar => 'ACCEPT_EULA=Y' ), $without,
|
||||
};
|
||||
like( $apt_render->(), qr{URIs: http://mirror\.example/ubuntu}, 'the pkgdir mirror joins the installer sources' );
|
||||
like( $apt_render->(), qr{^ conf: 'APT::Install-Recommends "false";'$}m, 'the installer installs without recommended packages, as ospkgs does' );
|
||||
# On a PReP machine curtin installs no bootloader package of its own: install_missing_packages
|
||||
# covers UEFI and s390x only, and install_grub then runs "dpkg-reconfigure grub-ieee1275".
|
||||
# The Ubuntu kernel image recommends grub-ieee1275, so the package reaches the target only
|
||||
# when the installer keeps recommended packages.
|
||||
unlike( $apt_render->( osarch => 'ppc64el' ), qr{APT::Install-Recommends},
|
||||
'except on ppc64el, where the bootloader the installer configures is a recommended package' );
|
||||
unlike( $apt_render->( environvar => 'http_proxy=http://proxy.example:3128' ), qr{mirror\.example|xcat-pkgdir},
|
||||
'but not for an osimage with environvar, whose mirrors may need those variables' );
|
||||
|
||||
# The offline configuration installs from the media alone and carries the same setting.
|
||||
local *xCAT::Template::ubuntu_subiquity_apt_mirror = sub { '' };
|
||||
like( $apt_render->(), qr{^ conf: 'APT::Install-Recommends "false";'$}m,
|
||||
'an offline install drops the recommended packages as well' );
|
||||
unlike( $apt_render->( osarch => 'ppc64el' ), qr{APT::Install-Recommends},
|
||||
'and keeps them on ppc64el for the same reason' );
|
||||
}
|
||||
|
||||
done_testing();
|
||||
|
||||
Reference in New Issue
Block a user