Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn on stale build due to kernel changed #485

Merged
merged 6 commits into from
Nov 1, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Warn on stale build for different kernel release
  • Loading branch information
paulo-ferraz-oliveira committed Oct 26, 2023
commit 76e6cf5b2fd5c4df1ad47dbbe5174cf7f98387f4
10 changes: 10 additions & 0 deletions kerl
Original file line number Diff line number Diff line change
Expand Up @@ -1627,6 +1627,16 @@ do_install() {
ERL_TOP="$KERL_BUILD_DIR/$build_name/otp_src_$rel"
cd "$ERL_TOP" || exit_install
init_install_logfile "$rel" "$build_name"

prev_build_kernel_release=$(grep <"$ERL_TOP"/"$KERL_CONFIG_STORAGE_FILENAME" -o '^uname -r: \(.*\)$' | sed -n 's|^uname -r: \(.*\)$|\1|p')
paulo-ferraz-oliveira marked this conversation as resolved.
Show resolved Hide resolved
if [ "$(uname -r)" != "$prev_build_kernel_release" ]; then
warn "this Erlang/OTP build appears to be stale. It was created with kernel release"
warn " '$prev_build_kernel_release' while currently your system's kernel release is" "noprefix"
warn " '$(uname -r)'." "noprefix"
warn " You should consider removing the build with 'kerl delete build ...' and" "noprefix"
warn " re-installing it with 'kerl build-install ...'" "noprefix"
fi
paulo-ferraz-oliveira marked this conversation as resolved.
Show resolved Hide resolved

if ! log_install_cmd "ERL_TOP=$ERL_TOP ./otp_build release -a $absdir && cd $absdir && ./Install $INSTALL_OPT $absdir"; then
show_install_logfile "install of Erlang/OTP $rel ($build_name), in $absdir, failed!"
exit_install
Expand Down