chiark / gitweb /
buildserver: ensure dirs to mount cache exist in guest VM instance
authorHans-Christoph Steiner <hans@eds.org>
Thu, 15 Sep 2016 13:50:16 +0000 (15:50 +0200)
committerHans-Christoph Steiner <hans@eds.org>
Mon, 19 Sep 2016 14:33:12 +0000 (16:33 +0200)
It seems that the 9p synced folder setup is not as flexible and easy as the
VirtualBox one, so we have to do more little things like this.

buildserver/Vagrantfile

index c182e07e6b5d025cbda62f82ee6d4d5fa76392ac..c353b5060d06b8985d5bca9cdde15530e9ff9fca 100644 (file)
@@ -52,6 +52,10 @@ Vagrant.configure("2") do |config|
     config.vm.synced_folder configfile["cachedir"], '/vagrant/cache',
       create: true, type: synced_folder_type
   end
+  # Make sure dir exists to mount to, since buildserver/ is
+  # automatically mounted as /vagrant in the guest VM. This is more
+  # necessary with 9p synced folders
+  Dir.mkdir('cache') unless File.exists?('cache')
 
   # cache .deb packages on the host via a mount trick
   if configfile.has_key? "aptcachedir"