Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 395d5e32 authored by Devin Moore's avatar Devin Moore
Browse files

Capture queryview stderr and stdout in finalization scripts

Sometimes the output wasn't grep-able and this fixes it.

Ignore-AOSP-First: b/304316873#comment10

Test: Run the bazel query command multiple times before/after
      and verify it works 100% of the time after.
Bug: 320589170
Change-Id: Ic60d3318287353aa71fdeb2c540899d588a2d273
parent 196c1b53
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ function create_new_compat_matrix() {
      }" >> $bp_file

    # get the previous kernel_configs properties and add them to the new module
    local kernel_configs=$($top/out/host/linux-x86/bin/bazel query --config=queryview //hardware/interfaces/compatibility_matrices:"$current_bp_module"--android_common --output=build | grep kernel_configs | sed 's/[^\[]*\[\(.*\)],/\1/' | sed 's/ //g' | sed 's/\"//g')
    local kernel_configs=$($top/out/host/linux-x86/bin/bazel query --config=queryview //hardware/interfaces/compatibility_matrices:"$current_bp_module"--android_common --output=build 2>$1 | grep kernel_configs | sed 's/[^\[]*\[\(.*\)],/\1/' | sed 's/ //g' | sed 's/\"//g')

    $top/out/host/linux-x86/bin/bpmodify -m $final_bp_module -property kernel_configs -a $kernel_configs -w $bp_file