mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-04 19:56:32 +02:00
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:
parent
67594116c0
commit
83848ede89
18
chroot_version_hooks.d/8_unmerge_gmp
Normal file
18
chroot_version_hooks.d/8_unmerge_gmp
Normal 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
|
||||
Loading…
x
Reference in New Issue
Block a user