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

Method define_yum_rc_tasks

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

Source from the content-addressed store, hash-verified

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