From a9bcccd3a15157f50314516ff22e05bfb572b486 Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Sun, 20 Jul 2014 16:59:18 -0700 Subject: [PATCH] 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. --- .../src/third_party/coreos-overlay/eclass/cros-workon.eclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/eclass/cros-workon.eclass b/sdk_container/src/third_party/coreos-overlay/eclass/cros-workon.eclass index 5ab28f0cfe..48d9f2b177 100644 --- a/sdk_container/src/third_party/coreos-overlay/eclass/cros-workon.eclass +++ b/sdk_container/src/third_party/coreos-overlay/eclass/cros-workon.eclass @@ -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 }