From a56246f3f69d60541b276ca91e15c3bc24bb79e2 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 26 Oct 2012 00:25:01 -0700 Subject: libecj-bootstrap,junit: Tweak to fix rebuild issues When rebuilding in already built tree we have these issues where a file is already deleted first time but rm fails on reexecution. This patch adds checks for such cases so that rebuilds are guarnteed Signed-off-by: Khem Raj --- recipes-core/ecj/libecj-bootstrap.inc | 9 +++++---- recipes-core/junit/junit_3.8.2.bb | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'recipes-core') diff --git a/recipes-core/ecj/libecj-bootstrap.inc b/recipes-core/ecj/libecj-bootstrap.inc index 4f85ba9..9e1cc1d 100644 --- a/recipes-core/ecj/libecj-bootstrap.inc +++ b/recipes-core/ecj/libecj-bootstrap.inc @@ -25,17 +25,18 @@ do_unpackpost() { fi # Remove crap. - rm about.html build.xml + rm -f about.html build.xml rm -rf META-INF # Move source into separate subdir. - mv org source/ - + if [ -d org ]; then + mv org source/ + fi # Remove stuff unneeded for the bootstrap compiler. rm -rf source/org/eclipse/jdt/internal/compiler/apt rm -rf source/org/eclipse/jdt/internal/compiler/tool rm -rf source/org/eclipse/jdt/internal/antadapter - rm source/org/eclipse/jdt/core/JDTCompilerAdapter.java + rm -f source/org/eclipse/jdt/core/JDTCompilerAdapter.java # Make a copy of the remaining source to get the embedded # resources. diff --git a/recipes-core/junit/junit_3.8.2.bb b/recipes-core/junit/junit_3.8.2.bb index 9d56618..ded03f2 100644 --- a/recipes-core/junit/junit_3.8.2.bb +++ b/recipes-core/junit/junit_3.8.2.bb @@ -14,8 +14,9 @@ do_unpackpost() { mkdir -p src # Prevent deletion by do_removebinaries. - mv src.jar src.zip - + if [ -e src.jar ]; then + mv src.jar src.zip + fi unzip src.zip -d src } -- cgit v1.2.3-54-g00ecf