pmbootstrap kconfig edit: support $builddir and $srcdir/build (#1573)

The linux APKBUILDs write the kernel config either to `$builddir`
(default from the template) or `$srcdir/build` (legacy, and I reverted
to that in #1556, which was not the proper fix for this regression).

With this commit, `pmbootstrap kconfig edit` is able to edit both
versions, and prints a note when the APKBUILD is still using the old
style.
This commit is contained in:
Oliver Smith 2018-06-18 22:21:18 +00:00 committed by GitHub
parent de1f244917
commit a4728124f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 5 deletions

View file

@ -110,9 +110,8 @@ def generate_apkbuild(args, pkgname, deviceinfo):
done
# Prepare kernel config ('yes ""' for kernels lacking olddefconfig)
mkdir -p "$srcdir"/build
cp "$srcdir"/$_config "$builddir"/.config
yes "" | make O="$srcdir"/build ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig
yes "" | make ARCH="$_carch" HOSTCC="$HOSTCC" oldconfig
}
build() {""" + build + """