2014-02-14 02:28:12 +00:00
|
|
|
module VagrantPlugins
|
|
|
|
module Cachier
|
|
|
|
class Bucket
|
|
|
|
class AptLists < Bucket
|
|
|
|
def self.capability
|
|
|
|
:apt_lists_dir
|
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
2014-07-21 01:55:30 +00:00
|
|
|
# Apt lists bucket can't be used on windows hosts
|
|
|
|
# https://github.com/fgrehm/vagrant-cachier/issues/106
|
|
|
|
return if Vagrant::Util::Platform.windows?
|
|
|
|
|
2014-02-14 02:28:12 +00:00
|
|
|
if guest.capability?(:apt_lists_dir)
|
|
|
|
guest_path = guest.capability(:apt_lists_dir)
|
|
|
|
|
2014-02-14 03:15:43 +00:00
|
|
|
return if @env[:cache_dirs].include?(guest_path)
|
2014-02-14 02:28:12 +00:00
|
|
|
|
2014-02-14 03:15:43 +00:00
|
|
|
symlink(guest_path)
|
2014-02-21 23:42:40 +00:00
|
|
|
comm.execute("mkdir -p /tmp/vagrant-cache/#{@name}/partial")
|
2014-02-14 02:28:12 +00:00
|
|
|
else
|
|
|
|
@env[:ui].info I18n.t('vagrant_cachier.skipping_bucket', bucket: 'apt-lists')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|