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

Method define_yum_recover_tasks

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

Source from the content-addressed store, hash-verified

2194 end
2195
2196 def define_yum_recover_tasks
2197 namespace :yum do
2198 namespace :recover do
2199 desc "Download repositories"
2200 task :download do
2201 yum_targets.each do |distribution, version|
2202 not_checksum_pattern = /.+(?<!\.asc|\.sha512)\z/
2203 target_dir = File.join(yum_recover_repositories_dir,
2204 distribution,
2205 version)
2206 pattern = not_checksum_pattern
2207 download_distribution(:artifactory,
2208 distribution,
2209 target_dir,
2210 :all,
2211 pattern: pattern,
2212 prefix: version)
2213 end
2214 end
2215
2216 desc "Update repositories"
2217 task :update do
2218 yum_targets.each do |distribution, version|
2219 version_dir = File.join(yum_recover_repositories_dir,
2220 distribution,
2221 version)
2222 next if File.symlink?(version_dir)
2223 next unless File.exist?(version_dir)
2224 Dir.glob("#{version_dir}/*") do |arch_dir|
2225 next unless File.directory?(arch_dir)
2226 sh("createrepo_c",
2227 arch_dir,
2228 out: default_output,
2229 verbose: verbose?)
2230 end
2231 end
2232 end
2233
2234 desc "Upload repositories"
2235 task :upload do
2236 yum_targets.each do |distribution, version|
2237 version_dir = File.join(yum_recover_repositories_dir,
2238 distribution,
2239 version)
2240 next if File.symlink?(version_dir)
2241 next unless File.exist?(version_dir)
2242 Dir.glob("#{version_dir}/*/repodata") do |repodata_dir|
2243 next unless File.directory?(repodata_dir)
2244 arch = File.basename(File.dirname(repodata_dir))
2245 prefix = "#{version}/#{arch}/repodata"
2246 uploader = ArtifactoryUploader.new(api_key: artifactory_api_key,
2247 destination_prefix: prefix,
2248 distribution: distribution,
2249 source: repodata_dir,
2250 staging: staging?)
2251 uploader.upload
2252 end
2253 end

Callers

nothing calls this directly

Calls 6

exist?Method · 0.80
directory?Method · 0.80
eachMethod · 0.45
joinMethod · 0.45
newMethod · 0.45
uploadMethod · 0.45

Tested by

no test coverage detected