[arch-projects] [mkinitcpio] [PATCH 3/3] functions: Create buildroot if it doesn't exist

Thomas Bächler thomas at archlinux.org
Wed Nov 27 13:30:06 EST 2013


Commit caf145fd4 causes mkinitcpio to bail out when the build directory
does not exist. However, we use '-d /run/initramfs' but noone creates
/run/initramfs for us.
---
 functions | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/functions b/functions
index 2b89c88..35e450a 100644
--- a/functions
+++ b/functions
@@ -637,7 +637,7 @@ initialize_buildroot() {
     fi
     buildroot=${2:-$workdir/root}
 
-    if [[ ! -w ${2:-$workdir} ]]; then
+    if ! install -dm755 "${buildroot}" && [[ ! -w $buildroot ]]; then
         error 'Unable to write to build root: %s' "$buildroot"
         return 1
     fi
-- 
1.8.4.2



More information about the arch-projects mailing list