vagrant-cachier-ng/lib/vagrant-cachier/bucket/apt.rb

25 lines
593 B
Ruby
Raw Normal View History

module VagrantPlugins
module Cachier
class Bucket
class Apt < Bucket
def self.capability
:apt_cache_dir
end
def install
if guest.capability?(:apt_cache_dir)
guest_path = guest.capability(:apt_cache_dir)
return if @env[:cache_dirs].include?(guest_path)
comm.execute("mkdir -p /tmp/vagrant-cache/#{@name}/partial")
symlink(guest_path)
else
@env[:ui].info I18n.t('vagrant_cachier.skipping_bucket', bucket: 'APT')
end
end
end
end
end
end