Make sure the files we try to execute in the chroot are marked as executable.
authorJorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org>
Fri, 2 Nov 2012 01:17:48 +0000 (00:17 -0100)
committerJorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org>
Fri, 2 Nov 2012 01:17:48 +0000 (00:17 -0100)
targets/support/functions.sh

index d362ece7405b58fb8ed723654c50ffb13e69c0ef..37fa74afc377d45e1d345d38e11395e86c8d6347 100644 (file)
@@ -22,10 +22,15 @@ exec_in_chroot(){
        local subdir=${2}
        local destdir=".${subdir}/tmp"
 
+       echo "Copying ${file_name} to ${destdir}"
        copy_to_chroot ${1} ${destdir}
-       chroot_path=${clst_chroot_path}${subdir}
        copy_to_chroot ${clst_sharedir}/targets/support/chroot-functions.sh \
                ${destdir}
+
+       echo "Ensure the file has the executable bit set"
+       chmod +x ${destdir}/${file_name}
+
+       chroot_path=${clst_chroot_path}${subdir}
        echo "Running ${file_name} in chroot ${chroot_path}"
        ${clst_CHROOT} ${chroot_path} ${destdir}/${file_name} || exit 1