diff --git a/build_image b/build_image index 271ef62b71..0f0d2bec98 100755 --- a/build_image +++ b/build_image @@ -443,9 +443,11 @@ update_dev_packages() { fi # Install the bare necessary files so that the "emerge" command works - [ ${FLAGS_statefuldev} -eq ${FLAGS_TRUE} ] && \ - sudo cp ${root_dev_dir}/etc/make.globals ${ROOT_FS_DIR}/etc/ - sudo sed -i s,/usr/bin/wget,wget, ${ROOT_FS_DIR}/etc/make.globals + if [ ${FLAGS_statefuldev} -eq ${FLAGS_TRUE} ]; then + sudo ln -sft ${ROOT_FS_DIR}/usr/share ../../usr/local/share/portage + sudo sed -i s,/usr/bin/wget,wget, \ + ${root_dev_dir}/share/portage/config/make.globals + fi sudo mkdir -p ${ROOT_FS_DIR}/etc/make.profile # Re-run ldconfig to fix /etc/ldconfig.so.cache.