[reprotest] 02/04: main: allow umask and user_group to both vary at the same time
Ximin Luo
infinity0 at debian.org
Fri Sep 22 16:31:42 UTC 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository reprotest.
commit 27c1391f63d924bdd01242feff4f83b11bc9d50d
Author: Ximin Luo <infinity0 at debian.org>
Date: Fri Sep 22 17:46:02 2017 +0200
main: allow umask and user_group to both vary at the same time
---
reprotest/__init__.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/reprotest/__init__.py b/reprotest/__init__.py
index a0245f8..f4bce48 100644
--- a/reprotest/__init__.py
+++ b/reprotest/__init__.py
@@ -141,7 +141,10 @@ class BuildContext(collections.namedtuple('_BuildContext', 'testbed_root local_d
['sh', '-ec', 'cd "%s" && rm -rf %s' %
(self.testbed_src, artifact_pattern)])
# this dance is necessary because the cwd can't be cd'd into during the setup phase under some variations like user_group
- new_script = build.append_setup_exec_raw('export', 'REPROTEST_BUILD_PATH=%s' % build.tree).to_script()
+ _ = build
+ _ = _.append_setup_exec_raw('export', 'REPROTEST_BUILD_PATH=%s' % build.tree)
+ _ = _.append_setup_exec_raw('export', 'REPROTEST_UMASK=$(umask)')
+ new_script = _.to_script()
logging.info("executing: %s", new_script)
argv = ['sh', '-ec', new_script]
xenv = ['%s=%s' % (k, v) for k, v in build.env.items()]
@@ -227,7 +230,9 @@ def corun_builds(build_command, source_root, artifact_pattern, result_dir, no_cl
bctx = BuildContext(testbed.scratch, result_dir, source_root, name, var)
build = bctx.make_build_commands(
- 'cd "$REPROTEST_BUILD_PATH"; unset REPROTEST_BUILD_PATH; ' + build_command, os.environ)
+ 'cd "$REPROTEST_BUILD_PATH"; unset REPROTEST_BUILD_PATH; ' +
+ 'umask "$REPROTEST_UMASK"; unset REPROTEST_UMASK; ' +
+ build_command, os.environ)
logging.log(5, "build %s: %r", name, build)
build = bctx.plan_variations(build)
logging.log(5, "build %s: %r", name, build)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/reprotest.git
More information about the Reproducible-commits
mailing list