Skip to content

Unset environment variables that are used by Autotools packages.#8623

Merged
becker33 merged 1 commit intospack:developfrom
skosukhin:clean_env
Jun 24, 2020
Merged

Unset environment variables that are used by Autotools packages.#8623
becker33 merged 1 commit intospack:developfrom
skosukhin:clean_env

Conversation

@skosukhin
Copy link
Copy Markdown
Member

It happens that the listed variables (see the changes) are set in the environment and affect the installation process of Autotools packages. With this PR, Spack unsets them when it's run with --clean flag (by default).

Probably, putting this logic to the setup_environment of AutotoolsPackage is better but I don't know the best way to get the value of args.dirty from there.

@adamjstewart
Copy link
Copy Markdown
Member

Probably, putting this logic to the setup_environment of AutotoolsPackage is better but I don't know the best way to get the value of args.dirty from there.

I think that would be a bad idea. We would have to change the setup_environment of every AutotoolsPackage that overrides it to call the super method as well. I think the place you put it is correct.

@skosukhin
Copy link
Copy Markdown
Member Author

This obviously affects CMake packages too.

@skosukhin
Copy link
Copy Markdown
Member Author

skosukhin commented Mar 19, 2020

@adamjstewart @alalazo can we give this another try?

I have also added logic for pkg-config.

@alalazo
Copy link
Copy Markdown
Member

alalazo commented Mar 27, 2020

I put that in for consideration in the next non bug-fix release.

@becker33
Copy link
Copy Markdown
Member

Closing and reopening to restart the tests

@becker33 becker33 closed this Jun 23, 2020
@becker33 becker33 reopened this Jun 23, 2020
@becker33 becker33 merged commit bc53bb9 into spack:develop Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants