2013-11-05 14:00:39 +00:00
|
|
|
module VagrantPlugins
|
|
|
|
module Cachier
|
|
|
|
class Bucket
|
|
|
|
class Zypper < Bucket
|
|
|
|
def self.capability
|
|
|
|
:zypper_cache_dir
|
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
|
|
|
if guest.capability?(:zypper_cache_dir)
|
|
|
|
guest_path = guest.capability(:zypper_cache_dir)
|
2014-02-14 03:15:43 +00:00
|
|
|
return if @env[:cache_dirs].include?(guest_path)
|
2013-11-05 14:00:39 +00:00
|
|
|
|
2014-02-14 03:15:43 +00:00
|
|
|
# Ensure caching is enabled
|
|
|
|
comm.sudo("zypper modifyrepo --keep-packages --all")
|
2013-11-05 14:00:39 +00:00
|
|
|
|
2014-02-14 03:15:43 +00:00
|
|
|
symlink(guest_path)
|
2013-11-05 14:00:39 +00:00
|
|
|
else
|
|
|
|
@env[:ui].info I18n.t('vagrant_cachier.skipping_bucket', bucket: 'Zypper')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|