After we've finalized the staging directory, there is no more need
for the root directory in the workspace. It used to get cleaned by
the setup_workspace() context manager but this is rather slow (can
take more than a second). By calling rmtree() explicitly, if we're
on a btrfs filesystem, we'll call btrfs subvolume delete which is
much faster than rm.
if context.config.output_format == OutputFormat.none:
finalize_staging(context)
+ rmtree(context.root)
return
install_volatile_packages(context)
run_postoutput_scripts(context)
finalize_staging(context)
+ rmtree(context.root)
print_output_size(context.config.output_dir_or_cwd() / context.config.output_with_compression)