Fixing toolchains (#2160)

* Fixing toolchains

* Tested toolchain download
This commit is contained in:
Igor Pečovnik
2020-08-25 22:42:06 +02:00
committed by GitHub
parent 2c3a15f2d9
commit 82cf5d3b16
2 changed files with 5 additions and 5 deletions

View File

@@ -620,7 +620,7 @@ find_toolchain()
# extract target major.minor version from expression
local target_ver
target_ver=$(grep -oE "[[:digit:]]+\.[[:digit:]]" <<< "$expression")
for dir in "${SRC}"/cache/toolchains/*/; do
for dir in "${SRC}"/cache/toolchain/*/; do
# check if is a toolchain for current $ARCH
[[ ! -f ${dir}bin/${compiler}gcc ]] && continue
# get toolchain major.minor version

View File

@@ -1061,7 +1061,7 @@ prepare_host()
find "${SRC}"/output "${USERPATCHES_PATH}" -type d ! -group sudo -exec chgrp --quiet sudo {} \;
find "${SRC}"/output "${USERPATCHES_PATH}" -type d ! -perm -g+w,g+s -exec chmod --quiet g+w,g+s {} \;
fi
mkdir -p "${DEST}"/debs-beta/extra "${DEST}"/debs/extra "${DEST}"/{config,debug,patch} "${USERPATCHES_PATH}"/overlay "${SRC}"/cache/{sources,hash,toolchains,utility,rootfs} "${SRC}"/.tmp
mkdir -p "${DEST}"/debs-beta/extra "${DEST}"/debs/extra "${DEST}"/{config,debug,patch} "${USERPATCHES_PATH}"/overlay "${SRC}"/cache/{sources,hash,toolchain,utility,rootfs} "${SRC}"/.tmp
display_alert "Checking for external GCC compilers" "" "info"
# download external Linaro compiler and missing special dependencies since they are needed for certain sources
@@ -1083,8 +1083,8 @@ prepare_host()
done
USE_TORRENT=${USE_TORRENT_STATUS}
rm -rf "${SRC}"/cache/toolchains/*.tar.xz*
local existing_dirs=( $(ls -1 "${SRC}"/cache/toolchains) )
rm -rf "${SRC}"/cache/toolchain/*.tar.xz*
local existing_dirs=( $(ls -1 "${SRC}"/cache/toolchain) )
for dir in ${existing_dirs[@]}; do
local found=no
for toolchain in ${toolchains[@]}; do
@@ -1094,7 +1094,7 @@ prepare_host()
done
if [[ $found == no ]]; then
display_alert "Removing obsolete toolchain" "$dir"
rm -rf "${SRC}/cache/toolchains/${dir}"
rm -rf "${SRC}/cache/toolchain/${dir}"
fi
done