From cc0d0ac4493583d43422e67a327e3b29bbe9d0e4 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 22 Oct 2010 08:16:40 -0700 Subject: [PATCH] prepare_build_dirs: tolerate permission issues --- pym/portage/package/ebuild/prepare_build_dirs.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pym/portage/package/ebuild/prepare_build_dirs.py b/pym/portage/package/ebuild/prepare_build_dirs.py index 25e5beb6e..74cf556ea 100644 --- a/pym/portage/package/ebuild/prepare_build_dirs.py +++ b/pym/portage/package/ebuild/prepare_build_dirs.py @@ -72,8 +72,12 @@ def prepare_build_dirs(myroot=None, settings=None, cleanup=False): try: for mydir in mydirs: ensure_dirs(mydir) - apply_secpass_permissions(mydir, - gid=portage_gid, uid=portage_uid, mode=0o70, mask=0) + try: + apply_secpass_permissions(mydir, + gid=portage_gid, uid=portage_uid, mode=0o70, mask=0) + except PortageException: + if not os.path.isdir(mydir): + raise for dir_key in ("PORTAGE_BUILDDIR", "HOME", "PKG_LOGDIR", "T"): """These directories don't necessarily need to be group writable. However, the setup phase is commonly run as a privileged user prior -- 2.26.2