mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-07 21:16:57 +02:00
Rather than having a toolchain package we use for the cross-compilers and installing a different one for the target build dir, use the same package. This makes updating more logical as we only have to do it in one place. BUG=chromium-os:24928 TEST=`cbuildbot amd64-generic-full` works TEST=`cbuildbot arm-generic-full` works TEST=`cbuildbot x86-generic-full` works TEST=build_packages+build_image for x86-alex boots & works Change-Id: Ib083c3d2eae75d6f5437203990599cdc837dd9dc Reviewed-on: https://gerrit.chromium.org/gerrit/24722 Reviewed-by: Anush Elangovan <anush@google.com> Commit-Ready: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org>
39 lines
824 B
Plaintext
39 lines
824 B
Plaintext
# Copyright (c) 2012 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.
|
|
|
|
# Move from chromeos-base/kernel-headers to sys-kernel/linux-headers.
|
|
|
|
opkg="chromeos-base/kernel-headers"
|
|
npkg="sys-kernel/linux-headers"
|
|
|
|
export CLEAN_DELAY=0
|
|
|
|
update() {
|
|
local root=$1 board=$2 emerge
|
|
|
|
if [[ -z ${board} ]]; then
|
|
board="root"
|
|
emerge="sudo -E emerge"
|
|
else
|
|
emerge="emerge-${board}"
|
|
fi
|
|
|
|
if portageq has_version ${root} ${opkg}; then
|
|
info "Migrating ${board} from ${opkg} to ${npkg}"
|
|
${emerge} -Cq ${opkg}
|
|
fi
|
|
if ! portageq has_version ${root} ${npkg}; then
|
|
${emerge} -1gq ${npkg}
|
|
fi
|
|
}
|
|
|
|
update / &
|
|
|
|
for board_root in /build/*; do
|
|
board=${board_root##*/}
|
|
update ${board_root} ${board} &
|
|
done
|
|
|
|
wait
|