From 2589aa4549c6337499157f15ada50ecb26043b43 Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Wed, 5 Mar 2008 18:45:46 +0000 Subject: [PATCH] Updated make_destpath so it writes out to make.conf as well as exporting ROOT to the environment, added a make_destpath call to cleanup_stages, and adding make_destpath /tmp/stage1root to stage1. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1358 d1e1f19c-881f-0410-ab34-b69fee027534 --- ChangeLog | 6 ++++++ targets/stage1/stage1-chroot.sh | 1 + targets/support/chroot-functions.sh | 18 ++++++++++-------- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index e4ae5a8f..44f766e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,12 @@ # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 # $Id: $ + 05 Mar 2008; Chris Gianelloni + targets/stage1/stage1-chroot.sh, targets/support/chroot-functions.sh: + Updated make_destpath so it writes out to make.conf as well as exporting + ROOT to the environment, added a make_destpath call to cleanup_stages, and + adding make_destpath /tmp/stage1root to stage1. + 05 Mar 2008; Chris Gianelloni README, catalyst: Updated README a bit and rolling 2.0.6_pre12 for testing. diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh index 950659c6..7ed142a0 100755 --- a/targets/stage1/stage1-chroot.sh +++ b/targets/stage1/stage1-chroot.sh @@ -20,6 +20,7 @@ fi ## START BUILD clst_root_path=/ setup_pkgmgr +make_destpath /tmp/stage1root # First, we drop in a known-good baselayout [ -e /etc/make.conf ] && \ diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh index b5b7e0ee..38a7af8f 100755 --- a/targets/support/chroot-functions.sh +++ b/targets/support/chroot-functions.sh @@ -179,6 +179,7 @@ cleanup_icecream() { } cleanup_stages() { + make_destpath if [ -n "${clst_DISTCC}" ] then cleanup_distcc @@ -213,16 +214,17 @@ die() { } make_destpath() { - if [ "${1}" = "" ] + # ROOT is / by default, so remove any ROOT= settings from make.conf + sed -i '/ROOT=/d' /etc/make.conf + export ROOT=/ + if [ "${1}" != "/" -a -n "${1}" ] then - # ROOT is / by default, so remove any ROOT= settings from make.conf - sed -i '/ROOT=/d' /etc/make.conf - else echo "ROOT=\"${1}\"" >> /etc/make.conf - if [ ! -d ${ROOT} ] - then - install -d ${ROOT} - fi + export ROOT=${1} + fi + if [ ! -d ${ROOT} ] + then + install -d ${ROOT} fi } -- 2.26.2