2013-06-07 22:37:02 -04:00
|
|
|
module VagrantPlugins
|
2013-05-22 19:38:26 -03:00
|
|
|
module Cachier
|
|
|
|
module Cap
|
|
|
|
module RedHat
|
|
|
|
module YumCacheDir
|
|
|
|
def self.yum_cache_dir(machine)
|
2016-09-26 13:59:40 +02:00
|
|
|
yum_cache_dir = nil
|
|
|
|
machine.communicate.tap do |comm|
|
|
|
|
# In case yum is only forwarding to dnf do not cache
|
|
|
|
return unless not comm.test('yum --version 2>&1 | grep /usr/bin/dnf')
|
|
|
|
yum_cache_dir = '/var/cache/yum'
|
|
|
|
end
|
|
|
|
return yum_cache_dir
|
2013-05-22 19:38:26 -03:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|