Add contentdir yum variable

The centos-release-qemu-ev repo package now supports $contentdir but
CentOS base has not fully caught up yet.[0]

[0] https://lists.centos.org/pipermail/centos-devel/2018-March/016542.html

Change-Id: I9e530b89092e0d4abb14750d4c181a7712c94e8c
This commit is contained in:
Samuel Cassiba 2018-05-17 22:23:41 -07:00
parent d8bbcfd1ec
commit 80706ed6e3
1 changed files with 10 additions and 0 deletions

View File

@ -110,6 +110,16 @@ when 'rhel'
action deps_action
end
# TODO(sc): workaround to add $contentdir
# removable when centos is updated
bash 'yum_contentdir' do
cwd ::File.dirname('/etc/yum/vars')
code <<-EOH
echo 'centos' > /etc/yum/vars/contentdir
EOH
not_if { ::File.exist?('/etc/yum/vars/contentdir') }
end
package 'centos-release-qemu-ev' do
action :upgrade
end