sandbox.py: Clarifications to the utility of Sandbox._disable_run()

In the past, BuildStream had internal sandbox implementations which
would require staging files on the local filesystem in order to run,
but now we use buildbox-run exclusively and always use CasBasedDirectory.

The _use_cas_based_directory() method was removed in the commit
b487a11f6ee529c9cba505106d054c92c16e864c, and this was actually the
only reason why we had the Element.BST_RUN_COMMANDS flag at the time.

We still want BST_RUN_COMMANDS for other reasons, and it is useful
to keep the Sandbox._disable_run() function, but it's only purpose
now is to ensure the invariant that plugins who set BST_RUN_COMMANDS
to False do not actually run commands.
2 files changed