-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add new initial command stage to mutex all reads of the installspace. #391
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,32 +50,25 @@ def get_env_loaders(package, context): | |
return sources | ||
|
||
|
||
def get_env_loader(package, context): | ||
"""This function returns a function object which extends a base environment | ||
based on a set of environments to load.""" | ||
|
||
def load_env(base_env): | ||
# Copy the base environment to extend | ||
job_env = dict(base_env) | ||
# Get the paths to the env loaders | ||
env_loader_paths = get_env_loaders(package, context) | ||
# If DESTDIR is set, set _CATKIN_SETUP_DIR as well | ||
if context.destdir is not None: | ||
job_env['_CATKIN_SETUP_DIR'] = context.package_dest_path(package) | ||
|
||
for env_loader_path in env_loader_paths: | ||
# print(' - Loading resultspace env from: {}'.format(env_loader_path)) | ||
resultspace_env = get_resultspace_environment( | ||
os.path.split(env_loader_path)[0], | ||
base_env=job_env, | ||
quiet=True, | ||
cached=context.use_env_cache, | ||
strict=False) | ||
job_env.update(resultspace_env) | ||
|
||
return job_env | ||
|
||
return load_env | ||
def load_env(logger, event_queue, job_env, package, context): | ||
# Get the paths to the env loaders | ||
env_loader_paths = get_env_loaders(package, context) | ||
# If DESTDIR is set, set _CATKIN_SETUP_DIR as well | ||
if context.destdir is not None: | ||
job_env['_CATKIN_SETUP_DIR'] = context.package_dest_path(package) | ||
|
||
for env_loader_path in env_loader_paths: | ||
if logger: | ||
logger.out('Loading environment from: {}'.format(env_loader_path)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
resultspace_env = get_resultspace_environment( | ||
os.path.split(env_loader_path)[0], | ||
base_env=job_env, | ||
quiet=True, | ||
cached=context.use_env_cache, | ||
strict=False) | ||
job_env.update(resultspace_env) | ||
|
||
return 0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've simplified this to no longer return a closure, since the arguments can all be captured in the |
||
|
||
|
||
def makedirs(logger, event_queue, path): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could call this loadenv or something instead; I'm not attached one way or another.