summaryrefslogtreecommitdiff
path: root/filesystem/android_device.go
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2025-03-07 12:27:25 -0800
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2025-03-07 12:27:25 -0800
commit2a90ef4d0cffa0172d9100a461296d40470781cd (patch)
tree199c98513184b71c43ced781315439528a6c271c /filesystem/android_device.go
parent8b09c4b7b6c98f09b789b0a4dda41afea08531bf (diff)
parent2dee3f7acad7cc5e9ff5d82b812ada56f8dc546c (diff)
Merge "Minor fixes for META/kernel_version.txt" into main
Diffstat (limited to 'filesystem/android_device.go')
-rw-r--r--filesystem/android_device.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/filesystem/android_device.go b/filesystem/android_device.go
index b1f668d57..a616ee053 100644
--- a/filesystem/android_device.go
+++ b/filesystem/android_device.go
@@ -191,7 +191,7 @@ func (a *androidDevice) GenerateAndroidBuildActions(ctx android.ModuleContext) {
allInstalledModules := a.allInstalledModules(ctx)
a.apkCertsInfo = a.buildApkCertsInfo(ctx, allInstalledModules)
- a.kernelConfig, a.kernelVersion = a.extractKernelVersionAndConfigs(ctx)
+ a.kernelVersion, a.kernelConfig = a.extractKernelVersionAndConfigs(ctx)
a.miscInfo = a.addMiscInfo(ctx)
a.buildTargetFilesZip(ctx, allInstalledModules)
a.buildProguardZips(ctx, allInstalledModules)
@@ -881,11 +881,12 @@ func (a *androidDevice) extractKernelVersionAndConfigs(ctx android.ModuleContext
Flag("--tools lz4:"+lz4tool.String()).Implicit(lz4tool).
FlagWithInput("--input ", kernel).
FlagWithOutput("--output-release ", extractedVersionFile).
- FlagWithOutput("--output-configs ", extractedConfigsFile)
+ FlagWithOutput("--output-configs ", extractedConfigsFile).
+ Textf(`&& printf "\n" >> %s`, extractedVersionFile)
if specifiedVersion := proptools.String(a.deviceProps.Kernel_version); specifiedVersion != "" {
specifiedVersionFile := android.PathForModuleOut(ctx, "specified_kernel_version.txt")
- android.WriteFileRuleVerbatim(ctx, specifiedVersionFile, specifiedVersion)
+ android.WriteFileRule(ctx, specifiedVersionFile, specifiedVersion)
builder.Command().Text("diff -q").
Input(specifiedVersionFile).
Input(extractedVersionFile).