Przeglądaj źródła

btf: simplify sublevel guard to X-only short-circuit

'lts' is os_patch_level, not a sublevel value; the lts tree's sublevel is
'X'. Drop the redundant 'lts' comparison, keep the 'X' short-circuit before
fromJSON(inputs.sublevel).
TheWildJames 1 miesiąc temu
rodzic
commit
ddff1ff2c8

+ 6 - 6
.github/actions/btf/action.yml

@@ -17,7 +17,7 @@ runs:
     - name: Apply libbpf feature-detection fix (android12-5.10)
       shell: bash
       working-directory: ${{ github.workspace }}/kernel/common
-      if: ${{ inputs.version == 'android12-5.10' && (inputs.sublevel == 'X' || inputs.sublevel == 'lts' || fromJSON(inputs.sublevel) > 43) }}
+      if: ${{ inputs.version == 'android12-5.10' && (inputs.sublevel == 'X' || fromJSON(inputs.sublevel) > 43) }}
       run: |
         set -euo pipefail
         patch -p1 -N < ${{ github.action_path }}/patches/0001-libbpf-remove-feature-detection-BTF.patch
@@ -25,7 +25,7 @@ runs:
     - name: Apply resolve_btfids linker-flag fix (android12-5.10)
       shell: bash
       working-directory: ${{ github.workspace }}/kernel/common
-      if: ${{ inputs.version == 'android12-5.10' && (inputs.sublevel == 'X' || inputs.sublevel == 'lts' || fromJSON(inputs.sublevel) > 43) }}
+      if: ${{ inputs.version == 'android12-5.10' && (inputs.sublevel == 'X' || fromJSON(inputs.sublevel) > 43) }}
       run: |
         set -euo pipefail
         patch -p1 -N < ${{ github.action_path }}/patches/0002-resolve_btfids-inherit-host-linker-flags.patch
@@ -33,7 +33,7 @@ runs:
     - name: Apply xdp_buff BTF-emit fix (android12-5.10)
       shell: bash
       working-directory: ${{ github.workspace }}/kernel/common
-      if: ${{ inputs.version == 'android12-5.10' && (inputs.sublevel == 'X' || inputs.sublevel == 'lts' || fromJSON(inputs.sublevel) > 43) }}
+      if: ${{ inputs.version == 'android12-5.10' && (inputs.sublevel == 'X' || fromJSON(inputs.sublevel) > 43) }}
       run: |
         set -euo pipefail
         # bpf_types.h references struct xdp_buff via
@@ -51,7 +51,7 @@ runs:
     - name: Apply resolve_btfids ELF_T_WORD endian fix (android12-5.10)
       shell: bash
       working-directory: ${{ github.workspace }}/kernel/common
-      if: ${{ inputs.version == 'android12-5.10' && (inputs.sublevel == 'X' || inputs.sublevel == 'lts' || fromJSON(inputs.sublevel) > 43) }}
+      if: ${{ inputs.version == 'android12-5.10' && (inputs.sublevel == 'X' || fromJSON(inputs.sublevel) > 43) }}
       run: |
         set -euo pipefail
         # Backport of upstream 61e8aeda9398 ("bpf: Fix libelf endian handling
@@ -72,7 +72,7 @@ runs:
     - name: Expose host dd for hermetic BTF generation (android12-5.10)
       shell: bash
       working-directory: ${{ github.workspace }}/kernel/common
-      if: ${{ inputs.version == 'android12-5.10' && (inputs.sublevel == 'X' || inputs.sublevel == 'lts' || fromJSON(inputs.sublevel) > 43) }}
+      if: ${{ inputs.version == 'android12-5.10' && (inputs.sublevel == 'X' || fromJSON(inputs.sublevel) > 43) }}
       run: |
         set -euo pipefail
         # The hermetic toolchain PATH (build.config.common -> HERMETIC_TOOLCHAIN=1)
@@ -88,7 +88,7 @@ runs:
     - name: Build and use pahole >=1.26 for hermetic BTF generation (android12-5.10)
       shell: bash
       working-directory: ${{ github.workspace }}/kernel
-      if: ${{ inputs.version == 'android12-5.10' && (inputs.sublevel == 'X' || inputs.sublevel == 'lts' || fromJSON(inputs.sublevel) > 43) }}
+      if: ${{ inputs.version == 'android12-5.10' && (inputs.sublevel == 'X' || fromJSON(inputs.sublevel) > 43) }}
       run: |
         set -euo pipefail
         # android12-5.10 pins prebuilt pahole v1.19, which fails to recode the

+ 1 - 1
.github/actions/setup-build-environment/action.yml

@@ -33,7 +33,7 @@ runs:
 
     - name: Install build deps for BTF generation (android12-5.10, sublevel>43)
       shell: bash
-      if: ${{ inputs.version == 'android12-5.10' && (inputs.sublevel == 'X' || inputs.sublevel == 'lts' || fromJSON(inputs.sublevel) > 43) }}
+      if: ${{ inputs.version == 'android12-5.10' && (inputs.sublevel == 'X' || fromJSON(inputs.sublevel) > 43) }}
       run: |
         set -euo pipefail
         sudo apt-get update -qq