Update build_image to link to make.globals directly, instead of to directory.

The xorg-server ebuild creates /usr/share/portage on the rootfs partition. This
breaks build_image which wants to point the same directory at the stateful
partition.

To work around this we just link to make.globals directly. This workaround fixes
gmerge but doesn't address the problem that there might be more files inside
/usr/share/portage. A better fix should be addressed as part of
crosbug.com/11502

BUG=chromium-os:12441
TEST=Run build_image and verify /usr/share/portage/config/make.globals points to
     /usr/local/share/portage/config/make.globals and that the latter also
     exists.

Review URL: http://codereview.chromium.org/6583001

Change-Id: I52fd9d34bf29573fbf6ca013ba49d1c8608e066d
This commit is contained in:
David James 2011-02-23 15:24:14 -08:00
parent 4de24322bd
commit e8875485ea

View File

@ -444,9 +444,9 @@ update_dev_packages() {
# Install the bare necessary files so that the "emerge" command works
if [ ${FLAGS_statefuldev} -eq ${FLAGS_TRUE} ]; then
sudo ln -sft ${ROOT_FS_DIR}/usr/share ../../usr/local/share/portage
sudo cp -a ${root_dev_dir}/share/portage ${ROOT_FS_DIR}/usr/share
sudo sed -i s,/usr/bin/wget,wget, \
${root_dev_dir}/share/portage/config/make.globals
${ROOT_FS_DIR}/usr/share/portage/config/make.globals
fi
sudo mkdir -p ${ROOT_FS_DIR}/etc/make.profile