Fixes FS#36654: https://bugs.archlinux.org/task/36654.

Signed-off-by: Maxime Gauduin <[email protected]>
---
 makechrootpkg.in | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/makechrootpkg.in b/makechrootpkg.in
index 8c64ae1..34f9ff3 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -288,11 +288,21 @@ _chrootbuild() {
        # XXX: Keep svn sources writable
        # Since makepkg 4.1.1 they get checked out via cp -a, copying the 
symlink
        for dir in /srcdest /startdir; do
-               cd $dir
+               cd "$dir"
                for svndir in */.svn; do
-                       rm ${svndir%/.svn}
-                       cp -a ${dir}_host/${svndir%/.svn} .
-                       chown -R nobody ${svndir%/.svn}
+                       rm "${svndir%/.svn}"
+                       cp -a "${dir}_host/${svndir%/.svn}" .
+                       chown -R nobody "${svndir%/.svn}"
+               done
+       done
+
+       # Same with bzr sources
+       for dir in /srcdest /startdir; do
+               cd "$dir"
+               for bzrdir in */.bzr; do
+                       rm "${bzrdir%/.bzr}"
+                       cp -a "${dir}_host/${bzrdir%/.bzr}" .
+                       chown -R nobody "${bzrdir%/.bzr}"
                done
        done
 
-- 
1.8.3.4

Reply via email to