Skip old file cleanup for non-full builds.
There are few build targets that don't generate an installed file list,
e.g. product-graph. Skip the old installed file cleanup step so that the
func doesn't complain about a lack of the list file.
Fixes: 168105598
Test: m product-graph
Change-Id: Ib7dce6b801979bb565b74d6355143bac23b84fe6
diff --git a/ui/build/kati.go b/ui/build/kati.go
index 06ec646..668b20e 100644
--- a/ui/build/kati.go
+++ b/ui/build/kati.go
@@ -229,7 +229,11 @@
// Cleanup steps.
cleanCopyHeaders(ctx, config)
- cleanOldInstalledFiles(ctx, config)
+ // Skip the old installed file cleanup step for few non-full build goals as we don't create
+ // an installed file list for them.
+ if config.FullBuild() {
+ cleanOldInstalledFiles(ctx, config)
+ }
}
// Clean out obsolete header files on the disk that were *not copied* during the