From 6b38b1e1af551d94ad491f1d62b9349c46b4e1b8 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 2 Nov 2011 11:03:33 -0400 Subject: [PATCH] update hooks: undo /etc/portage/env support This drops the work that we did in 14_board_portage_env as support for per-package env in the overlay has been moved to profile.bashrc. That do not require modification of any /etc/portage/env dirs. BUG=chromium-os:21787 TEST=update chroot to ver 15, make sure /build/*/etc/portage/env are gone Change-Id: I4f1d577f125a66efdeabdbbd8f862562c2e5d2e5 Reviewed-on: https://gerrit.chromium.org/gerrit/11047 Commit-Ready: Mike Frysinger Tested-by: Mike Frysinger Reviewed-by: David James --- .../15_board_portage_env_undo | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 chroot_version_hooks.d/15_board_portage_env_undo diff --git a/chroot_version_hooks.d/15_board_portage_env_undo b/chroot_version_hooks.d/15_board_portage_env_undo new file mode 100644 index 0000000000..66f3c50e77 --- /dev/null +++ b/chroot_version_hooks.d/15_board_portage_env_undo @@ -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. + +# Make sure the board's /etc/portage/env is no longer a symlink. +# This basically reverts the old 14_board_portage_env. +for board_root in /build/*; do + envd="${board_root}/etc/portage/env" + if [ -L "${envd}" ]; then + sudo rm -f "${envd}" + fi +done + +# Then undo the host bashrc. +if [ -L /etc/portage/bashrc ]; then + sudo rm -f /etc/portage/bashrc +fi + +exit 0