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.
This is more like unexpected behaviour than an actual bug, but 'bug' is the closest fit. I ran
spack mirror create --allexpecting it to mirror "all packages in the current environment", but it only mirrors theuser_specsfor the environment notall_specs.Passing through a combination of
--all --dependenciesdoesn't mirror everything either.For me the expected behaviour of
--allor--all --dependencieswould be to mirror everything in the current environment, so everything inall_specsnot justuser_specs.I made a fork that allows you to run
spack mirror create --dependenciesto 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 --dependencieswith an environment activated fetches everything inall_specs(what I do in my fork); currently this throws aNo packages were specifiederror so adding this in as an option wouldn't break people's existing workflows as it's new.spack mirror --allwith an environment activated fetches everything inall_specs, with a new--userflag that behaves the same way as--allcurrently does, might confuse people used to the current behaviour.spack mirror --all --dependenciesmight make more sense, but it could change existing behaviour as passing--all --dependenciescurrently 'works' but ignores the flags.