MCPcopy Create free account
hub / github.com/apache/arrow / define_yum_rc_tasks

Method define_yum_rc_tasks

dev/release/binary-task.rb:2020–2159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2018 end
2019
2020 def define_yum_rc_tasks
2021 namespace :yum do
2022 namespace :rc do
2023 base_dir = "#{yum_rc_repositories_dir}/base"
2024 incoming_dir = "#{yum_rc_repositories_dir}/incoming"
2025 upload_dir = "#{yum_rc_repositories_dir}/upload"
2026
2027 desc "Copy RPM packages"
2028 task :copy do
2029 yum_targets.each do |distribution, distribution_version|
2030 progress_label = "Copying: #{distribution} #{distribution_version}"
2031 progress_reporter = ProgressReporter.new(progress_label)
2032
2033 destination_dir = File.join(incoming_dir,
2034 distribution,
2035 distribution_version)
2036 rm_rf(destination_dir, verbose: verbose?)
2037 mkdir_p(destination_dir, verbose: verbose?)
2038
2039 source_dir_prefix =
2040 "#{artifacts_dir}/#{distribution}-#{distribution_version}"
2041 # apache/arrow uses almalinux-10-{amd64,arm64}.tar.gz but
2042 # apache/arrow-adbc uses almalinux-10.tar.gz So the
2043 # following glob must much both of them.
2044 Dir.glob("#{source_dir_prefix}*.tar.gz") do |tar_gz|
2045 sh("tar", "xf", tar_gz, "-C", incoming_dir)
2046 progress_reporter.advance
2047 end
2048
2049 case "#{distribution}-#{distribution_version}"
2050 when "almalinux-10",
2051 "almalinux-9",
2052 "almalinux-8",
2053 "amazon-linux-2023",
2054 "centos-9-stream"
2055 # Adjust source packages directory for backward
2056 # compatibility. We don't need this for new supported
2057 # distribution because we don't need to care about
2058 # backward compatibility for them.
2059 #
2060 # Example:
2061 # almalinux/10/Source/Packages/ ->
2062 # almalinux/10/Source/SPackages/
2063 mv(File.join(destination_dir, "Source", "Packages"),
2064 File.join(destination_dir, "Source", "SPackages"),
2065 verbose: true)
2066 end
2067
2068 progress_reporter.finish
2069 end
2070 end
2071
2072 desc "Download repodata for RC Yum repositories"
2073 task :download do
2074 yum_distributions.each do |distribution|
2075 distribution_dir = "#{base_dir}/#{distribution}"
2076 download_distribution(:artifactory,
2077 distribution,

Callers

nothing calls this directly

Calls 8

directory?Method · 0.80
eachMethod · 0.45
newMethod · 0.45
joinMethod · 0.45
advanceMethod · 0.45
finishMethod · 0.45
to_sMethod · 0.45
uploadMethod · 0.45

Tested by

no test coverage detected