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

Method define_apt_rc_tasks

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

Source from the content-addressed store, hash-verified

1637 end
1638
1639 def define_apt_rc_tasks
1640 namespace :apt do
1641 namespace :rc do
1642 base_dir = "#{apt_rc_repositories_dir}/base"
1643 incoming_dir = "#{apt_rc_repositories_dir}/incoming"
1644 merged_dir = "#{apt_rc_repositories_dir}/merged"
1645 upload_dir = "#{apt_rc_repositories_dir}/upload"
1646
1647 desc "Copy .deb packages"
1648 task :copy do
1649 apt_targets.each do |distribution, code_name, component|
1650 progress_label = "Copying: #{distribution} #{code_name}"
1651 progress_reporter = ProgressReporter.new(progress_label)
1652
1653 distribution_dir = "#{incoming_dir}/#{distribution}"
1654 pool_dir = "#{distribution_dir}/pool/#{code_name}"
1655 rm_rf(pool_dir, verbose: verbose?)
1656 mkdir_p(pool_dir, verbose: verbose?)
1657
1658 source_dir_prefix = "#{artifacts_dir}/#{distribution}-#{code_name}"
1659 # apache/arrow uses debian-bookworm-{amd64,arm64}.tar.gz but
1660 # apache/arrow-adbc uses debian-bookworm.tar.gz So the following
1661 # glob must much both of them.
1662 Dir.glob("#{source_dir_prefix}*.tar.gz") do |tar_gz|
1663 sh("tar", "xf", tar_gz, "-C", incoming_dir)
1664 progress_reporter.advance
1665 end
1666
1667 if distribution == "ubuntu"
1668 universe_dir = "#{pool_dir}/universe"
1669 next unless File.exist?(universe_dir)
1670 mv(universe_dir, "#{pool_dir}/main")
1671 end
1672
1673 progress_reporter.finish
1674 end
1675 end
1676
1677 desc "Download dists/ for RC APT repositories"
1678 task :download do
1679 apt_targets.each do |distribution, code_name, component|
1680 not_checksum_pattern = /.+(?<!\.asc|\.sha512)\z/
1681 base_distribution_dir =
1682 "#{base_dir}/#{distribution}/dists/#{code_name}"
1683 pattern = not_checksum_pattern
1684 download_distribution(:artifactory,
1685 distribution,
1686 base_distribution_dir,
1687 :base,
1688 pattern: pattern,
1689 prefix: "dists/#{code_name}")
1690 end
1691 end
1692
1693 desc "Sign .deb packages"
1694 task :sign do
1695 apt_distributions.each do |distribution|
1696 distribution_dir = "#{incoming_dir}/#{distribution}"

Callers

nothing calls this directly

Calls 6

exist?Method · 0.80
eachMethod · 0.45
newMethod · 0.45
advanceMethod · 0.45
finishMethod · 0.45
uploadMethod · 0.45

Tested by

no test coverage detected