1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-16 20:21:32 +03:00

kernel-builder: Prepend diff on normalization error

This commit is contained in:
Samuel Dionne-Riel 2020-09-29 20:40:20 -04:00
parent bfac9ff7ae
commit 5b14ef0650

View File

@ -182,10 +182,14 @@ let kernel = stdenv.mkDerivation {
# reads the existing .config file and prompts the user for options in
# the current kernel source that are not found in the file.
make $makeFlags "''${makeFlagsArray[@]}" oldconfig
if ! diff -q $buildRoot/.config{,.old}; then
if ! diff -q $buildRoot/.config{.old,}; then
printf "\n\n--------------------------------\n"
diff -u $buildRoot/.config{.old,} || :
printf "\n--------------------------------\n\n"
echo 'error: Your configuration does not match once passed through `make oldconfig`.'
echo ' Use the `bin/kernel-normalize-config` tool to refresh the configuration.'
echo " Don't forget to make sure the changed configuration options are good!"
printf "\n"
exit 1
fi
runHook postConfigure