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

Method define_apt_rc_tasks

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

Source from the content-addressed store, hash-verified

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