Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix multilib builds with --use-bootstrap-image
When building an i?86 package (with i?86 chroot config) on an x86_64 host, we report to kernel that we work in 32 bit mode (using the '/bin/setarch'-like condPersonality() call). This is completely OK and desired for the build (target) chroot, but not for the bootstrap chroot which is generated from a container image. The container image has always a host-native arch (unless there's a configuration error). So the pre-installed packages are x86_64. When we want to install additional packages there (typically to provide the 'dnf builddep' command in bootstrap), and we do that using the package manager already installed in bootstrap image (no package manager on host is required!), the package manager is confused by the 32-bit mode and resolves '$basearch' into 'i386' instead of 'x86_64'. So we need to switch back to 64-bit mode (in a subprocess, preexec_fn). Note that a late call to `os.uname()` would be confused by the condPersonality() call. So newly we rather remember the 'host_arch' at the beginning in config_opts, before the initial call to condPersonality(). Fixes: #1110
- Loading branch information