[build-in-chroot.sh] Lock local repo when downloading local repo packages (during build stage). Fixes issue where local repo is rebuilt while packages are being downloaded