Skip to content

Commit fa0cd84

Browse files
kouzanmato1984
authored andcommitted
apacheGH-47948: [CI][Packaging][Deb] Add missing directory existent check (apache#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: apache#47948 Authored-by: Sutou Kouhei <[email protected]> Signed-off-by: Raúl Cumplido <[email protected]>
1 parent 55e6066 commit fa0cd84

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.github/workflows/package_linux.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ on:
2929
- '.github/workflows/report_ci.yml'
3030
- 'cpp/**'
3131
- 'c_glib/**'
32+
- 'dev/release/binary-task.rb'
33+
- 'dev/release/verify-apt.rb'
34+
- 'dev/release/verify-yum.rb'
3235
- 'dev/tasks/linux-packages/**'
3336
- 'format/Flight.proto'
3437
tags:
@@ -40,6 +43,9 @@ on:
4043
- '.github/workflows/report_ci.yml'
4144
- 'cpp/**'
4245
- 'c_glib/**'
46+
- 'dev/release/binary-task.rb'
47+
- 'dev/release/verify-apt.rb'
48+
- 'dev/release/verify-yum.rb'
4349
- 'dev/tasks/linux-packages/**'
4450
- 'format/Flight.proto'
4551
types:

dev/release/binary-task.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1579,7 +1579,7 @@ def apt_update(base_dir, incoming_dir, merged_dir)
15791579
base_dists_dir = "#{base_dir}/#{distribution}/dists/#{code_name}"
15801580
merged_dists_dir = "#{merged_dir}/#{distribution}/dists/#{code_name}"
15811581
rm_rf(merged_dists_dir)
1582-
if Dir.empty?(base_dists_dir)
1582+
if Dir.exist?(base_dists_dir) and Dir.empty?(base_dists_dir)
15831583
mkdir_p(File.dirname(merged_dists_dir))
15841584
cp_r(dists_dir, File.dirname(merged_dists_dir))
15851585
else

0 commit comments

Comments
 (0)