summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephane Desneux <stephane.desneux@iot.bzh>2019-06-20 07:41:04 +0000
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2019-06-20 10:54:39 +0000
commita80c2f8e53139940c1e412364f058fea679ee7d2 (patch)
tree4c97b9a861d62fa430457533f7dda7a074a00c79
parent7e6f5bb94352ac0b6cd5c5cdd3035eec6c6bc559 (diff)
meta-rcar-gen3/setup_mm_packages.sh: always clean workdir
The script setup_mm_packages.sh setups a temp dir to extract proprietary drivers for Renesas BSP, but it's not re-entrant: the temp dir is not cleaned after execution. With the introduction of the change 9bc6c25 (hotfix for GFX issues), more cleanup is needed to avoid duplicate zips detection in the copy script located in meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh This change makes some initial cleanup in the workdir (in case of transition from a previous script without this patch) and also removes the workdir at the end Bug-AGL: SPEC-2253, SPEC-2480 Change-Id: Ia95f9045d8a695d550a061710a17676088a92c0a Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
-rw-r--r--meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh b/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh
index 798ebfb8a..f53025e2f 100644
--- a/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh
+++ b/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh
@@ -44,6 +44,9 @@ function log() {
}
function copy_mm_packages() {
+ # first clean up workdir
+ [[ -d $EXTRACT_DIR ]] && rm -r $EXTRACT_DIR
+
if [ -f $DOWNLOAD_DIR/$ZIP_1 -a -f $DOWNLOAD_DIR/$ZIP_2 ]; then
mkdir -p $EXTRACT_DIR
cp --update $DOWNLOAD_DIR/$ZIP_1 $EXTRACT_DIR
@@ -113,4 +116,7 @@ function copy_mm_packages() {
rm -r $EXTRACT_DIR/$GFX_ARCHIVE_NAME
log "The graphics hotfix for BUG SPEC-2253 has been successfully applied."
+
+ # clean up workdir if not done by older script
+ rm -r $EXTRACT_DIR
}