install_cross_toolchain: work around crossdev being part of the SDK

The SDK job includes most crossdev x86 files but doesn't include the
/usr/local/portage/crossdev/cross-x86_64-cros-linux-gnu/ symlinks for
the ebuild files. This causes the crossdev packages to be deinstalled
as obsolete.
Detect when the symlink folder is missing and run crossdev to create
it during update_chroot setup.
This commit is contained in:
Kai Lüke 2020-06-23 17:22:52 +02:00
parent 14d245c19a
commit 72a6bd155e
No known key found for this signature in database
GPG Key ID: E5601DA3A1D902A8

View File

@ -314,7 +314,7 @@ install_cross_toolchain() {
fi
# Only call crossdev to regenerate configs if something has changed
if ! cmp --quiet - "${cross_cfg}" <<<"${cross_cfg_data}"
if [[ ! -d "${cross_overlay}/cross-${cross_chost}" ]] || ! cmp --quiet - "${cross_cfg}" <<<"${cross_cfg_data}"
then
$sudo crossdev "${cross_flags[@]}" --init-target
$sudo tee "${cross_cfg}" <<<"${cross_cfg_data}" >/dev/null