From 22d2c8230175ecbaa75fa7107d2ae4801fde1235 Mon Sep 17 00:00:00 2001 From: Mike Purvis Date: Wed, 10 Aug 2016 15:49:43 -0400 Subject: [PATCH] Drop job env from clean jobs. --- catkin_tools/jobs/catkin.py | 22 +++++----------------- catkin_tools/jobs/cmake.py | 19 +++---------------- 2 files changed, 8 insertions(+), 33 deletions(-) diff --git a/catkin_tools/jobs/catkin.py b/catkin_tools/jobs/catkin.py index f400b682..f7a2bec8 100644 --- a/catkin_tools/jobs/catkin.py +++ b/catkin_tools/jobs/catkin.py @@ -351,7 +351,7 @@ def create_catkin_build_job(context, package, package_path, dependencies, force_ # Package metadata path metadata_path = context.package_metadata_path(package) # Environment dictionary for the job, which will be built - # up by the executions in the getenv stage. + # up by the executions in the loadenv stage. job_env = dict(os.environ) # Create job stages @@ -506,26 +506,14 @@ def create_catkin_clean_job( clean_install): """Generate a Job that cleans a catkin package""" + stages = [] + # Package build space path build_space = context.package_build_space(package) # Package metadata path metadata_path = context.package_metadata_path(package) - # Environment dictionary for the job, which will be built - # up by the executions in the getenv stage. - job_env = dict(os.environ) - - # Create job stages - stages = [] - - # Get environment for job. - stages.append(FunctionStage( - 'getenv', - load_env, - locked_resource='installspace', - job_env=job_env, - package=package, - context=context - )) + # Environment dictionary for the job, empty for a clean job + job_env = {} # Remove installed files if clean_install: diff --git a/catkin_tools/jobs/cmake.py b/catkin_tools/jobs/cmake.py index b60114e3..5d503304 100644 --- a/catkin_tools/jobs/cmake.py +++ b/catkin_tools/jobs/cmake.py @@ -218,7 +218,7 @@ def create_cmake_build_job(context, package, package_path, dependencies, force_c # Package metadata path metadata_path = context.package_metadata_path(package) # Environment dictionary for the job, which will be built - # up by the executions in the getenv stage. + # up by the executions in the loadenv stage. job_env = dict(os.environ) # Get actual staging path @@ -353,24 +353,11 @@ def create_cmake_clean_job( build_space = context.package_build_space(package) # Package metadata path metadata_path = context.package_metadata_path(package) - # Environment dictionary for the job, which will be built - # up by the executions in the getenv stage. - job_env = dict(os.environ) + # Environment dictionary for the job, empty for a clean job + job_env = {} - # Create job stages stages = [] - # Get environment for job. - stages.append(FunctionStage( - 'getenv', - load_env, - locked_resource='installspace', - job_env=job_env, - package=package, - context=context - )) - - # Remove installed files if clean_install and context.install: installed_files = get_installed_files(context.package_metadata_path(package)) stages.append(FunctionStage(