fetch-vendor-package.sh: Remove the older vendor-package am: 815210a13a am: f2fc6fb581
Original change: https://android-review.googlesource.com/c/device/linaro/hikey/+/2146079
Change-Id: Iac348f2ced78ea7df786035cd3588cbec1901362
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/fetch-vendor-package.sh b/fetch-vendor-package.sh
index cbadbde..0a50853 100755
--- a/fetch-vendor-package.sh
+++ b/fetch-vendor-package.sh
@@ -13,6 +13,14 @@
pushd ${ANDROID_BUILD_TOP}
+# remove the older vendor-package, if any, because upstream
+# mesa prebuilts in linaro-vendor-package ain't declared
+# within a contained namespace and we can run into build
+# errors because of redefinition of mesa prebuilt modules
+# from the previous vendor-package.
+# FIXME move mesa prebuilts from Android.mk to Android.bp
+rm -rf ${ANDROID_BUILD_TOP}/vendor/linaro/
+
if [ ! -e "${PKG_FILE}.tgz" ]; then
curl -L ${VND_PKG_URL} -o ${PKG_FILE}.tgz
fi