Sort the file with image content.
While modifying the CTS shim apex packages, it was observed that the
output of the image content file is not necessarily sorted, which in
turn can cause failure when checking the file against a whitelist.
Bug: 138429615
Test: Succesfully built a modified version of CTS Shim v3 that was
previously failing because of the issue this CL fixes.
Change-Id: I901859ae08feb6012f34b851e125977e1c0100d9
diff --git a/apex/apex.go b/apex/apex.go
index 629cbbf..a421850 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -1374,6 +1374,8 @@
copyCommands = append(copyCommands, "ln -s "+filepath.Base(dest)+" "+symlinkDest)
}
}
+ emitCommands = append(emitCommands, "sort -o "+imageContentFile.String()+" "+imageContentFile.String())
+
implicitInputs := append(android.Paths(nil), filesToCopy...)
implicitInputs = append(implicitInputs, a.manifestOut)