Allow overwrite of directories in copy_to_dist_dir

If we would like to run _dist tasks twice, we have to allow overwriting
files inside directories. It is enough to make directory writable before
copying its contents, which allows removal of the files inside. Then
shutil.copytree will restore correct permissions through the copystat.

Test: TH
Bug: 267607344
Change-Id: I11f8e330c06d71ef1a1b674f846f70bd1bbb1931
1 file changed
tree: f662b7d90c60f5759bba575cfae40277ed76e458
  1. dist/
  2. docs/
  3. exec/
  4. rules/
  5. test_mappings/
  6. workspace/
  7. OWNERS
  8. README.md
README.md

Bazel Common Rules

This directory contains common Bazel rules and tools shared between the Platform and Kernel builds.

For platform-specific rules, place them in the platform checkout's //build/bazel/rules directory.

For kernel-specific rules, place them in kernel checkout's //build/kleaf directory.