Remove old versions of dev-libs/gmp to ease chroot upgrades.

BUG=none
TEST=Run it, make sure old versions are unmerged.

Change-Id: I2a281284fc17e221985c9c2b184a5a23ba90d773
This commit is contained in:
David James 2011-09-12 10:37:58 -07:00 committed by chrome-bot
parent 67594116c0
commit 83848ede89

View File

@ -0,0 +1,18 @@
# Copyright (c) 2011 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.
# Unmerge dev-libs/gmp in all boards where it's still linked against the old
# version.
for board_root in /build/*; do
board=$(basename "${board_root}")
emerge_board=$(which emerge-${board} 2>/dev/null || true)
scanelf_out=$(scanelf -qn ${board_root}/usr/lib/libgmpxx.so.4 || true)
if [ -x "${emerge_board}" ] && [[ "$scanelf_out" == *libgmp.so.3* ]]; then
CLEAN_DELAY=0 ${emerge_board} --unmerge dev-libs/gmp || true
eclean-${board} -d packages || true
fi
done
info "Chroot upgraded to version 8: Unmerge old dev-libs/gmp"
exit 0