This is an automated email from the ASF dual-hosted git repository.

raulcd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new d9697b1f09 GH-47948: [CI][Packaging][Deb] Add missing directory 
existent check (#47949)
d9697b1f09 is described below

commit d9697b1f0935aeec729f0a9eb22b2df55fac4870
Author: Sutou Kouhei <[email protected]>
AuthorDate: Mon Oct 27 17:10:36 2025 +0900

    GH-47948: [CI][Packaging][Deb] Add missing directory existent check (#47949)
    
    ### Rationale for this change
    
    `Dir.empty?` fails with nonexistent directory.
    
    ### What changes are included in this PR?
    
    Add `Dir.exist?` before `Dir.empty?`.
    
    ### Are these changes tested?
    
    Yes.
    
    ### Are there any user-facing changes?
    
    No.
    * GitHub Issue: #47948
    
    Authored-by: Sutou Kouhei <[email protected]>
    Signed-off-by: Raúl Cumplido <[email protected]>
---
 .github/workflows/package_linux.yml | 6 ++++++
 dev/release/binary-task.rb          | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/package_linux.yml 
b/.github/workflows/package_linux.yml
index d7606fe811..bd4eed4a35 100644
--- a/.github/workflows/package_linux.yml
+++ b/.github/workflows/package_linux.yml
@@ -29,6 +29,9 @@ on:
       - '.github/workflows/report_ci.yml'
       - 'cpp/**'
       - 'c_glib/**'
+      - 'dev/release/binary-task.rb'
+      - 'dev/release/verify-apt.rb'
+      - 'dev/release/verify-yum.rb'
       - 'dev/tasks/linux-packages/**'
       - 'format/Flight.proto'
     tags:
@@ -40,6 +43,9 @@ on:
       - '.github/workflows/report_ci.yml'
       - 'cpp/**'
       - 'c_glib/**'
+      - 'dev/release/binary-task.rb'
+      - 'dev/release/verify-apt.rb'
+      - 'dev/release/verify-yum.rb'
       - 'dev/tasks/linux-packages/**'
       - 'format/Flight.proto'
     types:
diff --git a/dev/release/binary-task.rb b/dev/release/binary-task.rb
index f0f9c567c2..42465de125 100644
--- a/dev/release/binary-task.rb
+++ b/dev/release/binary-task.rb
@@ -1579,7 +1579,7 @@ APT::FTPArchive::Release::Description 
"#{apt_repository_description}";
         base_dists_dir = "#{base_dir}/#{distribution}/dists/#{code_name}"
         merged_dists_dir = "#{merged_dir}/#{distribution}/dists/#{code_name}"
         rm_rf(merged_dists_dir)
-        if Dir.empty?(base_dists_dir)
+        if Dir.exist?(base_dists_dir) and Dir.empty?(base_dists_dir)
           mkdir_p(File.dirname(merged_dists_dir))
           cp_r(dists_dir, File.dirname(merged_dists_dir))
         else

Reply via email to