blob: f0dff240a33d45c11650806f25e081e5ca90e481 [file] [log] [blame]
# Copyright 2018 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Many python packages were poisoned with lib64 paths. Clear them.
# https://crbug.com/876634
clear_board() {
local b="$1" board="$2"
if [[ "$(portageq-${board} envvar ARCH 2>/dev/null)" != "arm" ]]; then
return
fi
echo "Cleaning out board ${board}"
local pkgs=( $(qfile --root "${b}" -Cq /usr/lib64) )
if [[ ${#pkgs[@]} -gt 0 ]]; then
sudo qmerge --root "${b}" -Uqy "${pkgs[@]}"
fi
sudo rm -rf "${b}/usr/lib64"
}
for b in /build/*; do
if [[ -d "${b}/usr/lib64" ]]; then
board="${b##*/}"
clear_board "${b}" "${board}" &
fi
done
wait