Introduce check to see if chroot version file exists
We currently unconditionally cat a file in archbuild
:
CURRENT_CHROOT_VERSION=$(cat "${chroots}/${repo}-${arch}/root/.arch-chroot")
This results in the following error:
==> Updating pacman database cache
:: Synchronizing package databases...
core downloading...
extra downloading...
multilib downloading...
==> Building protobuf
-> repo: extra-staging
-> arch: x86_64
-> worker: chris-3
==> Building protobuf for [extra-staging] (x86_64)
cat: /var/lib/archbuild/extra-staging-x86_64/root/.arch-chroot: No such file or directory
==> Creating chroot for [extra-staging] (x86_64)...
This should either be properly guarded (if [[ -f ... ]]
) or the error should be silenced