Update prebuilt_etc available for snapshot
Make prebuilt_etc module available for the snapshot. This change
includes implementing snapshot interface for the prebuilt_etc module so
it can be added to the snapshot from the fake snapshot, or when the
module is specified in the list.
Bug: 192430376
Test: m nothing passed
Test: Checked if the module is included in the snapshot properly
Change-Id: I3574d2a1b8f8f4e5f083f3913e8768f5088d0c46
diff --git a/cc/vendor_snapshot.go b/cc/vendor_snapshot.go
index 6705d55..ba4d79f 100644
--- a/cc/vendor_snapshot.go
+++ b/cc/vendor_snapshot.go
@@ -210,9 +210,9 @@
if fake {
// All prebuilt binaries and headers are installed by copyFile function. This makes a fake
// snapshot just touch prebuilts and headers, rather than installing real files.
- return writeStringToFileRule(ctx, "", out)
+ return snapshot.WriteStringToFileRule(ctx, "", out)
} else {
- return copyFileRule(ctx, path, out)
+ return snapshot.CopyFileRule(pctx, ctx, path, out)
}
}
@@ -350,7 +350,7 @@
ctx.Errorf("json marshal to %q failed: %#v", propOut, err)
return nil
}
- ret = append(ret, writeStringToFileRule(ctx, string(j), propOut))
+ ret = append(ret, snapshot.WriteStringToFileRule(ctx, string(j), propOut))
return ret
}