Skip to content

Mirror All Dependencies in Environment #16808

@RobertRosca

Description

@RobertRosca

This is more like unexpected behaviour than an actual bug, but 'bug' is the closest fit. I ran spack mirror create --all expecting it to mirror "all packages in the current environment", but it only mirrors the user_specs for the environment not all_specs.

Passing through a combination of --all --dependencies doesn't mirror everything either.

For me the expected behaviour of --all or --all --dependencies would be to mirror everything in the current environment, so everything in all_specs not just user_specs.

I made a fork that allows you to run spack mirror create --dependencies to mirror everything non-external, and was going to do a PR but maybe my expectation is wrong and this is supposed to behave as it currently does 😛

Is there another way to mirror everything in an environment that I'm not aware of, or is it worth me making this PR?

Edit: if this does have to be a new flag, the options I can think of are:

  • spack mirror --dependencies with an environment activated fetches everything in all_specs (what I do in my fork); currently this throws a No packages were specified error so adding this in as an option wouldn't break people's existing workflows as it's new.
  • spack mirror --all with an environment activated fetches everything in all_specs, with a new --user flag that behaves the same way as --all currently does, might confuse people used to the current behaviour.
  • spack mirror --all --dependencies might make more sense, but it could change existing behaviour as passing --all --dependencies currently 'works' but ignores the flags.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions