mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-22 22:21:10 +02:00
update hooks: add /etc/portage/env support
Newer setup_board now sets up /etc/portage/env in the board root as a symlink. Add an update hook to fix up all existing boards. Also migrate /etc/portage/bashrc in the chroot. BUG=chromium-os:21787 TEST=update chroot from ver 13 to ver 14; make sure /build/*/etc/portage/env are symlinks Change-Id: I8b828b8773998e1aa0104c42bad2dd2ac5c8416c Reviewed-on: http://gerrit.chromium.org/gerrit/10344 Reviewed-by: David James <davidjames@chromium.org> Reviewed-by: Raymes Khoury <raymes@chromium.org> Commit-Ready: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
parent
1e4d0c0b3d
commit
328b9eab02
19
chroot_version_hooks.d/14_board_portage_env
Normal file
19
chroot_version_hooks.d/14_board_portage_env
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# 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.
|
||||||
|
|
||||||
|
cfgd="/usr/local/portage/chromiumos/chromeos/config"
|
||||||
|
|
||||||
|
# Make sure the board's /etc/portage/env is a symlink and not a dir.
|
||||||
|
for board_root in /build/*; do
|
||||||
|
envd="${board_root}/etc/portage/env"
|
||||||
|
if [ -d "${envd}" ]; then
|
||||||
|
sudo rm -rf "${envd}"
|
||||||
|
sudo ln -s "${cfgd}/env" "${envd}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Make sure we have bashrc on the host.
|
||||||
|
sudo ln -sf "${cfgd}/bashrc-host" /etc/portage/bashrc
|
||||||
|
|
||||||
|
exit 0
|
Loading…
x
Reference in New Issue
Block a user