mache.spack.pins.checkout_command

mache.spack.pins.checkout_command(entry, dest)[source]

Bash commands that make dest a clean checkout of a pin entry.

The clone is created if it is absent. Otherwise its origin is pointed at the entry’s git, which may have changed since the clone was made (e.g. to a fork), and fetched. The clone is then detached and hard-reset to the pinned ref, so any local changes (such as the etc/spack/include.yaml that spack isolate rewrites) are discarded.

Parameters:
  • entry (dict) – A validated pin entry

  • dest (str) – The directory to clone into

Returns:

commands (str) – Bash commands