Skip to content

Commit

Permalink
mail-client/thunderbird: move fatal rust version check to pkg_setup
Browse files Browse the repository at this point in the history
In case no rust version is installed yet, the rust check in pkg_pretend
will block any PM run which would pull in rust.

Moving fatal check to pkg_setup will still prevent unnecessary compile time
but avoid that block.

Closes: https://bugs.gentoo.org/733692
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Thomas Deutschmann <[email protected]>
  • Loading branch information
Whissi committed Jul 24, 2020
1 parent 4c3c49a commit 1632545
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions mail-client/thunderbird/thunderbird-68.10.0.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,10 @@ pkg_pretend() {
local rustc_version=( $(eselect --brief rust show 2>/dev/null) )
rustc_version=${rustc_version[0]/rust-bin-/}
rustc_version=${rustc_version/rust-/}
[[ -z "${rustc_version}" ]] && die "Failed to determine rustc version!"

if ver_test "${rustc_version}" -ge "1.45.0" ; then
die "Rust >=1.45.0 is not supported. Please use 'eselect rust' to switch to <rust-1.45.0!"
if [[ -n "${rustc_version}" ]] ; then
if ver_test "${rustc_version}" -ge "1.45.0" ; then
die "Rust >=1.45.0 is not supported. Please use 'eselect rust' to switch to <rust-1.45.0!"
fi
fi

if use pgo ; then
Expand All @@ -247,6 +247,15 @@ pkg_setup() {
moz_pkgsetup

if [[ ${MERGE_TYPE} != binary ]] ; then
local rustc_version=( $(eselect --brief rust show 2>/dev/null) )
rustc_version=${rustc_version[0]/rust-bin-/}
rustc_version=${rustc_version/rust-/}
[[ -z "${rustc_version}" ]] && die "Failed to determine rustc version!"

if ver_test "${rustc_version}" -ge "1.45.0" ; then
die "Rust >=1.45.0 is not supported. Please use 'eselect rust' to switch to <rust-1.45.0!"
fi

# Ensure we have enough disk space to compile
if use pgo || use lto || use debug || use test ; then
CHECKREQS_DISK_BUILD="8G"
Expand Down

0 comments on commit 1632545

Please sign in to comment.