chroot_version_hooks: Clean cache to overwrite some libbrillo files.

Some library and package config files of libbrillo were created at
src_install() phase into the cache. It prevented overwriting when we
switch to create those files at src_compile with() a normal user.

TEST=none
BUG=chromium:949944
CQ-DEPEND=CL:1494915

Change-Id: I73ae7730f69fb26bea5f85724883eb5a33a6835b
Reviewed-on: https://chromium-review.googlesource.com/1564290
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Tatsuhisa Yamaguchi <yamaguchi@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
diff --git a/chroot_version_hooks.d/165_clean_libbrillo_so b/chroot_version_hooks.d/165_clean_libbrillo_so
new file mode 100644
index 0000000..9ce0982
--- /dev/null
+++ b/chroot_version_hooks.d/165_clean_libbrillo_so
@@ -0,0 +1,9 @@
+# Copyright 2019 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Some library and package config files of libbrillo were created at
+# src_install() phase into the cache. It prevents overwriting when we switch to
+# create those files at src_compile with the user priviledge.
+
+sudo rm -rf /var/cache/portage/* /build/*/var/cache/portage/*