Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion conda_build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1276,7 +1276,8 @@ def test(recipedir_or_package_or_metadata, config, move_broken=True):

warn_on_use_of_SRC_DIR(metadata)

config.compute_build_id(metadata.name())
if config.set_build_id:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this will make the test phase run without the build id, right?
Then before tests the work dir will be removed. But what happens if the package has no tests or they are not run? Wouldn't the next conda build command reuse the dirty work dir?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that without --dirty, the work dir would be cleaned up, but to be honest, I really never use --no-build-id. --no-build-id definitely breaks multiple builds happening at once, but it should still be clean for one build at a time.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I'd like to add that in the example showed on #2101 if I replace the source url with a local path the work dir is overwritten and the example works

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually my example has no tests at all, so it seems the work dir is really not cleaned up when starting a new build with --no-build-id.

Copy link
Copy Markdown
Contributor

@gqmelo gqmelo Jun 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I checked and the work dir with --no-build-id was not being deleted because the cleanup code was taking the work dir modified by the test phase even when there is no test. So this PR also fixes this case.

config.compute_build_id(metadata.name())

clean_pkg_cache(metadata.dist(), config)

Expand Down