catalyst: make sure the 'portage' user can write to distfiles and ccache

Adding the update step appears to break permissions on the distfiles
directory. Ensure the portage user is correct and set the permissions on
directories it needs to write to in advance.
This commit is contained in:
Michael Marineau 2014-12-17 12:22:20 -08:00
parent 4debbfc257
commit 3b40989d52

View File

@ -75,6 +75,8 @@ cat <<EOF
export TERM='${TERM}'
export MAKEOPTS='--jobs=${NUM_JOBS} --load-average=${load}'
export EMERGE_DEFAULT_OPTS="\$MAKEOPTS"
export PORTAGE_USERNAME=portage
export PORTAGE_GRPNAME=portage
EOF
}
@ -210,7 +212,8 @@ write_configs() {
export CCACHE_DIR="$TEMPDIR/ccache"
info "Creating output directories..."
mkdir -p "$TEMPDIR" "$DISTDIR" "$CCACHE_DIR"
mkdir -m 775 -p "$TEMPDIR" "$DISTDIR" "$CCACHE_DIR"
chown portage:portage "$DISTDIR" "$CCACHE_DIR"
info "Writing out catalyst configs..."
info " $TEMPDIR/catalyst.conf"
catalyst_conf > "$TEMPDIR/catalyst.conf"