Guess kbuild out dir for downstreamkernel_package (MR 2231)

find_kbuild_output_dir() searches for certain path patterns, which
won't be in the APKBUILD if it uses downstreamkernel_package. Guess
the default kbuild out dir in that case.

Theoretically this might break if some APKBUILD passes weird paths to
downstreamkernel_package, but no kernel package in pmaports today does
that.
This commit is contained in:
Fiona Klute 2024-01-18 12:37:01 +01:00 committed by Oliver Smith
parent f8d203e8e5
commit f1311424d1
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -61,6 +61,11 @@ def find_kbuild_output_dir(function_body):
guesses = []
for line in function_body:
for item in line.split():
# Guess that any APKBUILD using downstreamkernel_package
# uses the default kbuild out directory.
if item == "downstreamkernel_package":
guesses.append("")
break
kbuild_out = match_kbuild_out(item)
if kbuild_out is not None:
guesses.append(kbuild_out)