lib/beaker/host/unix/file.rb in beaker-5.8.1 vs lib/beaker/host/unix/file.rb in beaker-6.1.0
- old
+ new
@@ -90,11 +90,11 @@
case self['platform']
when /amazon|fedora|el-|redhat|centos/
'/etc/yum.repos.d/'
when /opensuse|sles/
'/etc/zypp/repos.d/'
- when /debian|ubuntu|cumulus|huaweios/
+ when /debian|ubuntu/
'/etc/apt/sources.list.d'
else
msg = "package config dir unknown for platform '#{self['platform']}'"
raise ArgumentError, msg
end
@@ -111,30 +111,21 @@
def repo_filename(package_name, build_version)
variant, version, arch, codename = self['platform'].to_array
repo_filename = format("pl-%s-%s-", package_name, build_version)
case variant
- when /amazon|fedora|el|redhat|centos|cisco_nexus|cisco_ios_xr|opensuse|sles/
+ when /amazon|fedora|el|redhat|centos|opensuse|sles/
variant = 'el' if %w[centos redhat].include?(variant)
variant = 'redhatfips' if self['packaging_platform']&.include?('redhatfips')
- if variant == 'cisco_nexus'
- variant = 'cisco-wrlinux'
- version = '5'
- end
- if variant == 'cisco_ios_xr'
- variant = 'cisco-wrlinux'
- version = '7'
- end
fedora_prefix = (variant == 'fedora' ? 'f' : '')
pattern = "%s-%s%s-%s.repo"
repo_filename << (format(pattern, variant, fedora_prefix, version, arch))
- when /debian|ubuntu|cumulus|huaweios/
- codename = variant if variant == 'cumulus' || variant == 'huaweios'
+ when /debian|ubuntu/
repo_filename << (format("%s.list", codename))
else
msg = "#repo_filename: repo filename pattern not known for platform '#{self['platform']}'"
raise ArgumentError, msg
end
@@ -149,10 +140,10 @@
# @return [String] Type of repo (rpm|deb)
def repo_type
case self['platform']
when /amazon|fedora|el-|redhat|centos|opensuse|sles/
'rpm'
- when /debian|ubuntu|cumulus|huaweios/
+ when /debian|ubuntu/
'deb'
else
msg = "#repo_type: repo type not known for platform '#{self['platform']}'"
raise ArgumentError, msg
end