Skip to contentSkip to conversation

perf: mkdir ${B} -> mkdir -p ${B}

PATCH New Martin Jansa 1 participant 2 messages Sep 18, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 perf: mkdir ${B} -> mkdir -p ${B}

From: Robert Yang <[email protected]>

${B} is the default cwd of tasks, so there might be race issues such as:
| mkdir: cannot create directory `/path/to/work/qemux86-poky-linux/perf/1.0-r9/perf-1.0/': File exists [snip]
NOTE: recipe perf-1.0-r9: task do_configure: Failed

---
 meta/recipes-kernel/perf/perf.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-kernel/perf/perf.bb +1 -1
index 1f1f552..cf75918 100644
@@ -119,7 +119,7 @@ do_install() {
 do_configure_prepend () {
     # Fix for rebuilding
     rm -rf ${B}/
-    mkdir ${B}/
+    mkdir -p ${B}/
 
     #kernels before 3.1 do not support WERROR env variable
     sed -i 's,-Werror ,,' ${S}/tools/perf/Makefile
Signature · 1 line
2.5.1
#1 lore raw

PATCH 2/2 autotools.bbclass: mkdir ${B} -> mkdir -p ${B}

From: Robert Yang <[email protected]>

${B} is the default cwd of tasks, so there might be race issues such as:
| mkdir: cannot create directory `${B}': File exists
[snip]
NOTE: recipe perf-1.0-r9: task do_configure: Failed

---
 meta/classes/autotools.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/autotools.bbclass +1 -1
index b5f4516..dbe5e91 100644
@@ -105,7 +105,7 @@ autotools_preconfigure() {
 			if [ "${S}" != "${B}" ]; then
 				echo "Previously configured separate build directory detected, cleaning ${B}"
 				rm -rf ${B}
-				mkdir ${B}
+				mkdir -p ${B}
 			else
 				# At least remove the .la files since automake won't automatically
 				# regenerate them even if CFLAGS/LDFLAGS are different
Signature · 1 line
2.5.1