Skip to content

Commit

Permalink
build_slider: Modify AOSP ToT check to use repo aosp/ revision
Browse files Browse the repository at this point in the history
Before, the check for building AOSP ToT used s-dev-gs-pixel-5.10, which
broke on the various other targets that build_slider.sh supports. Fix
this by directly checking the aosp/ revision set in the manifest.

Bug: 184667897
Signed-off-by: J. Avila <[email protected]>
Change-Id: I9d8bd71ab9ca1f40fe192ad9980245d743f59d59
  • Loading branch information
J. Avila committed May 6, 2021
1 parent 416bf29 commit c89f9fa
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions build_slider.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,18 @@ if [ "${BUILD_KERNEL}" = "0" ]; then
fi

if [ "${EXPERIMENTAL_BUILD}" = "0" -a "${BUILD_KERNEL}" != "0" ]; then
MANIFEST_SHA=$(cat .repo/manifests/default.xml | grep "path=\"aosp\"" |
sed -n "s/^.*revision=\"\([0-9a-fA-F]*\)\".*/\1/p")
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 [ -n "${LOCAL_MERGE_BASE}" -a "${REPO_SHA}" != "${LOCAL_MERGE_BASE}" ]; then
if [ -n "${LOCAL_MERGE_BASE}" -a \
"${MANIFEST_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"
echo " it is prone to errors. Please base any changes on the latest"
echo " merge point as specified in the manifest."
exit_if_error 1 "aosp/ is not based on latest merge point"
fi
popd > /dev/null
fi
Expand Down

0 comments on commit c89f9fa

Please sign in to comment.