Skip to content

Commit 260c2f0

Browse files
authored
GH-46240: [Release][Packaging] Fix a bug that existing APT repositories' metadata are lost (#46287)
### Rationale for this change APT repositories' metadata for 20.0.0 RC 2 don't have existing packages such as 19.0.1 packages. We should keep metadata for existing packages and append metadata for new packages. ### What changes are included in this PR? * Fix paths for existing metadata * Fix pattern for detecting new packages * This is for apache/arrow-adbc#2769 ### Are these changes tested? Yes. I tested this with ADBC 18 RC 0. ### Are there any user-facing changes? No. * GitHub Issue: #46240 Authored-by: Sutou Kouhei <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
1 parent 067fd2a commit 260c2f0

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

dev/release/binary-task.rb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1649,7 +1649,10 @@ def define_apt_rc_tasks
16491649
rm_rf(pool_dir, verbose: verbose?)
16501650
mkdir_p(pool_dir, verbose: verbose?)
16511651
source_dir_prefix = "#{artifacts_dir}/#{distribution}-#{code_name}"
1652-
Dir.glob("#{source_dir_prefix}-*/*") do |path|
1652+
# apache/arrow uses debian-bookworm-{amd64,arm64} but
1653+
# apache/arrow-adbc uses debian-bookworm. So the following
1654+
# glob must much both of them.
1655+
Dir.glob("#{source_dir_prefix}*/*") do |path|
16531656
base_name = File.basename(path)
16541657
package_name = ENV["DEB_PACKAGE_NAME"]
16551658
if package_name.nil? or package_name.empty?
@@ -1686,16 +1689,17 @@ def define_apt_rc_tasks
16861689

16871690
desc "Download dists/ for RC APT repositories"
16881691
task :download do
1689-
apt_distributions.each do |distribution|
1692+
apt_targets.each do |distribution, code_name, component|
16901693
not_checksum_pattern = /.+(?<!\.asc|\.sha512)\z/
1691-
base_distribution_dir = "#{base_dir}/#{distribution}"
1694+
base_distribution_dir =
1695+
"#{base_dir}/#{distribution}/dists/#{code_name}"
16921696
pattern = not_checksum_pattern
16931697
download_distribution(:artifactory,
16941698
distribution,
16951699
base_distribution_dir,
16961700
:base,
16971701
pattern: pattern,
1698-
prefix: "dists")
1702+
prefix: "dists/#{code_name}")
16991703
end
17001704
end
17011705

0 commit comments

Comments
 (0)