Skip to content

Commit fa41b26

Browse files
authored
GH-48256: [Packaging][Linux] Use closer.lua?action=download URL (#48257)
### Rationale for this change If we use the `closer.lua?action=download` URL, we don't need to find a mirror download URL manually. Note that this code isn't used in our release process. Because we use RC source archive not released source archive in our release process. ### What changes are included in this PR? Use `closer.lua?action=download` URL instead of scraping manually. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: #48256 Authored-by: Sutou Kouhei <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
1 parent 79d6458 commit fa41b26

File tree

1 file changed

+2
-5
lines changed
  • dev/tasks/linux-packages/apache-arrow

1 file changed

+2
-5
lines changed

dev/tasks/linux-packages/apache-arrow/Rakefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,8 @@ class ApacheArrowPackageTask < PackageTask
6969
def download_released_archive
7070
mirror_base_url = "https://www.apache.org/dyn/closer.lua/arrow"
7171
mirror_list_url = "#{mirror_base_url}/arrow-#{@version}/#{@archive_name}"
72-
open(mirror_list_url) do |response|
73-
if /href="(.+?\/#{Regexp.escape(@archive_name)})"/ =~ response.read
74-
download($1, ".")
75-
end
76-
end
72+
mirror_download_url = "#{mirror_list_url}?action=download"
73+
download(mirror_download_url, @archive_name)
7774
end
7875

7976
def build_archive

0 commit comments

Comments
 (0)