From ceb95585185056047c2edb945a131ce936b7c680 Mon Sep 17 00:00:00 2001 From: "J. Avila" Date: Thu, 29 Apr 2021 22:08:28 +0000 Subject: [PATCH] build_slider: Throw a warning when trying to build AOSP ToT At the moment, building AOSP ToT for mixed builds is not supported, as it is prone to crashes and build issues. Throw a warning advising that all changes should be based on m/s-dev-gs-pixel-5.10 if the merge base of the aosp/ dir has progressed beyond the manifest revision. Bug: 184667897 Signed-off-by: J. Avila Change-Id: I38eda7c5d9e234c280a4813c34ee374a1d62c0f4 --- build_slider.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/build_slider.sh b/build_slider.sh index 33a8959dd36d..9c99f68b5ff6 100755 --- a/build_slider.sh +++ b/build_slider.sh @@ -94,6 +94,21 @@ if [ "${LTO}" = "none" -a "${BUILD_KERNEL}" = "0" ]; then fi +if [ "${EXPERIMENTAL_BUILD}" = "0" -a "${BUILD_KERNEL}" != "0" ]; then + pushd aosp/ > /dev/null + # Booting AOSP ToT does not always work; throw a warning to prevent this. + REPO_SHA=$(git log -1 --pretty="format:%H" m/s-dev-gs-pixel-5.10) + LOCAL_MERGE_BASE=$(git merge-base HEAD aosp/android12-5.10) + if [ "${REPO_SHA}" != "${LOCAL_MERGE_BASE}" ]; then + echo "Your aosp/ directory appears to be synced to a point beyond the" + echo " latest AOSP merge point. This is not supported, currently, as" + echo " it is prone to errors. Please base any changes on" + echo " m/s-dev-gs-pixel-5.10." + exit_if_error 1 "aosp/ is not based on m/s-dev-gs-pixel-5.10" + fi + popd > /dev/null +fi + if [ "${BUILD_KERNEL}" != "0" -o "${EXPERIMENTAL_BUILD}" != "0" ]; then build_gki else