Make incremental queryview builds work.

The breakage was because:
- aosp/1818236 removed the "rm -fr" invocation from the Ninja file that
removed the old queryview tree
- queryview files were created with permissions 440 to discourage manual
editing

These two together made incremental queryview invocations not be able to
overwrite its output files.

(Of course, it also made them incorrect since old files were lft in place)

Test: Presubmits.
Change-Id: Idaa3e1db82c9eb8325c48e37aca5146e69af7333
This commit is contained in:
Lukacs T. Berki
2021-09-07 08:47:21 +02:00
parent 3a82169a55
commit 7edd91c0f4

View File

@@ -15,14 +15,16 @@
package main
import (
"android/soong/android"
"android/soong/bp2build"
"io/ioutil"
"os"
"path/filepath"
"android/soong/android"
"android/soong/bp2build"
)
func createBazelQueryView(ctx *bp2build.CodegenContext, bazelQueryViewDir string) error {
os.RemoveAll(bazelQueryViewDir)
ruleShims := bp2build.CreateRuleShims(android.ModuleTypeFactories())
// Ignore metrics reporting and compat layers for queryview, since queryview