fetch-vendor-package.sh: Remove the older vendor-package am: 815210a13a am: f2fc6fb581 am: 93bdfacfc6 am: 538d7a0192 am: 69bdfb8f0e

Original change: https://android-review.googlesource.com/c/device/linaro/hikey/+/2146079

Change-Id: I2867235f39435683d54ceec28fbfda7c17a35ade
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