vagrant-cachier-ng/lib/vagrant-cachier/bucket/dnf.rb
Lalatendu Mohanty 081c809fc3 Fixes Issue #163: Modification for DNF package manager
Dnf is the new package manager for Fedora.
And it is the default package manager for F22 and F23

Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
2015-11-16 02:45:12 +05:30

26 lines
628 B
Ruby

module VagrantPlugins
module Cachier
class Bucket
class Dnf < Bucket
def self.capability
:dnf_cache_dir
end
def install
if guest.capability?(:dnf_cache_dir)
guest_path = guest.capability(:dnf_cache_dir)
return if @env[:cache_dirs].include?(guest_path)
# Ensure caching is enabled
comm.sudo("echo 'keepcache=true' >> /etc/dnf/dnf.conf")
symlink(guest_path)
else
@env[:ui].info I18n.t('vagrant_cachier.skipping_bucket', bucket: 'Dnf')
end
end
end
end
end
end