Stage sources directly to CAS

Background

Task description

As pointed out here here, source cache and source plugins go through a temp directory when committing sources to the CAS. Really we want source plugins to be able to export staged sources as CAS based directories, allowing buildstream to more efficiently combine them. This will require a change to source plugin method stage to take cas based directories as an argument rather than just file paths, and SourceCache commit method to use this to more efficiently stage sources to cache. This should also allow in future more of source plugins to be done directly in the CAS.

To allow plugins to switch over we should probably set a temporary flag that specifies source plugins can stage to a CAS based directory.

  • Add flag to specify which sources can stage directly to CAS.
  • Change SourceCache to work with a CAS based directory in commit
  • Change core plugins to stage to CAS based directories, having at least one would allow us to check that source cache works with them, though it might be better to put others in separate MRs.

Acceptance Criteria

Have the source cache commit method work staging sources directly to CAS.


Follow up to #440 (closed)