From b8394f7e6a3a771362c9170ea2bd4e6f39c7e771 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Fri, 21 Feb 2014 20:42:40 -0300 Subject: [PATCH] Ensure apt partial dirs are created _after_ the symlink is in place, otherwise we would not be able to properly detect whether a bucket is empty or not --- lib/vagrant-cachier/bucket/apt.rb | 2 +- lib/vagrant-cachier/bucket/apt_lists.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vagrant-cachier/bucket/apt.rb b/lib/vagrant-cachier/bucket/apt.rb index 44cf0fc..c5453c3 100644 --- a/lib/vagrant-cachier/bucket/apt.rb +++ b/lib/vagrant-cachier/bucket/apt.rb @@ -12,8 +12,8 @@ module VagrantPlugins return if @env[:cache_dirs].include?(guest_path) - comm.execute("mkdir -p /tmp/vagrant-cache/#{@name}/partial") symlink(guest_path) + comm.execute("mkdir -p /tmp/vagrant-cache/#{@name}/partial") else @env[:ui].info I18n.t('vagrant_cachier.skipping_bucket', bucket: 'APT') end diff --git a/lib/vagrant-cachier/bucket/apt_lists.rb b/lib/vagrant-cachier/bucket/apt_lists.rb index e6bef12..b01b56b 100644 --- a/lib/vagrant-cachier/bucket/apt_lists.rb +++ b/lib/vagrant-cachier/bucket/apt_lists.rb @@ -12,8 +12,8 @@ module VagrantPlugins return if @env[:cache_dirs].include?(guest_path) - comm.execute("mkdir -p /tmp/vagrant-cache/#{@name}/partial") symlink(guest_path) + comm.execute("mkdir -p /tmp/vagrant-cache/#{@name}/partial") else @env[:ui].info I18n.t('vagrant_cachier.skipping_bucket', bucket: 'apt-lists') end