Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emerge-webrsync: Create repo location with $PORTAGE_USERNAME:$PORTAGE_GRPNAME ownership #1390

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
10 changes: 9 additions & 1 deletion bin/emerge-webrsync
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ eval "$("${portageq}" envvar -v DISTDIR EPREFIX FEATURES \
PORTAGE_BIN_PATH PORTAGE_CONFIGROOT PORTAGE_GPG_DIR \
PORTAGE_NICENESS PORTAGE_REPOSITORIES PORTAGE_RSYNC_EXTRA_OPTS \
PORTAGE_RSYNC_OPTS PORTAGE_TEMP_GPG_DIR PORTAGE_TMPDIR \
PORTAGE_USERNAME PORTAGE_GRPNAME \
USERLAND http_proxy https_proxy ftp_proxy)"
export http_proxy https_proxy ftp_proxy

Expand Down Expand Up @@ -696,7 +697,14 @@ main() {

handle_pgp_setup

[[ -d ${repo_location} ]] || mkdir -p "${repo_location}"
if [[ ! -d ${repo_location} ]]; then
mkdir -p "${repo_location}"
duxsco marked this conversation as resolved.
Show resolved Hide resolved

if has usersync ${FEATURES} ; then
chown "${PORTAGE_USERNAME:-portage}":"${PORTAGE_GRPNAME:-portage}" "${repo_location}"
duxsco marked this conversation as resolved.
Show resolved Hide resolved
fi
fi

if [[ ! -w ${repo_location} ]] ; then
die "Repository '${repo_name}' is not writable: ${repo_location}"
fi
Expand Down