Skip to content

Commit

Permalink
Drop job env from clean jobs.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepurvis committed Aug 16, 2016
1 parent da43594 commit 22d2c82
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 33 deletions.
22 changes: 5 additions & 17 deletions catkin_tools/jobs/catkin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
19 changes: 3 additions & 16 deletions catkin_tools/jobs/cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 22d2c82

Please sign in to comment.