mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-19 21:41:05 +02:00
eclass: set default portage user and group
The PORTAGE_USERNAME and PORTAGE_GRPNAME variables are not exported by default. The SDK uses them to get portage to run builds as the developer's uid/gid instead of portage:portage. When running outside of the SDK use the default portage user and group.
This commit is contained in:
parent
86ccf944f2
commit
a9bcccd3a1
@ -470,8 +470,8 @@ cros-workon_pkg_setup() {
|
||||
if [[ ${CROS_WORKON_INCREMENTAL_BUILD} == "1" ]]; then
|
||||
local out=$(cros-workon_get_build_dir)
|
||||
addwrite "${out}"
|
||||
mkdir -p -m 755 "${out}"
|
||||
chown ${PORTAGE_USERNAME}:${PORTAGE_GRPNAME} "${out}" "${out%/*}"
|
||||
mkdir -p -m 755 "${out}" || die
|
||||
chown ${PORTAGE_USERNAME:-portage}:${PORTAGE_GRPNAME:-portage} "${out}" "${out%/*}" || die
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user