From e11470af18d737645dbd0f1bf546e3a0958bfeb3 Mon Sep 17 00:00:00 2001 From: Trey Dockendorf Date: Fri, 13 Oct 2023 13:30:21 -0400 Subject: [PATCH] Cleanup problematic files --- lib/ood_packaging/build.rb | 5 +++++ spec/ood_packaging/build_spec.rb | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lib/ood_packaging/build.rb b/lib/ood_packaging/build.rb index 23f53d1..7a9fd77 100644 --- a/lib/ood_packaging/build.rb +++ b/lib/ood_packaging/build.rb @@ -284,8 +284,13 @@ def install_deb_dependencies! 'mk-build-deps --install --remove --root-cmd sudo', "--tool='#{tool.join(' ')}'" ] + cleanup = [ + "#{package}-build-deps*.buildinfo", + "#{package}-build-deps*.changes" + ] Dir.chdir(deb_work_dir) do sh "#{cmd.join(' ')}#{cmd_suffix}" + sh "rm -f #{cleanup.join(' ')}#{cmd_suffix}" end end diff --git a/spec/ood_packaging/build_spec.rb b/spec/ood_packaging/build_spec.rb index f1c3d53..17f4dd4 100644 --- a/spec/ood_packaging/build_spec.rb +++ b/spec/ood_packaging/build_spec.rb @@ -158,8 +158,13 @@ "--tool='#{tool.join(' ')}'", '2>/dev/null 1>/dev/null' ] + cleanup = [ + 'ondemand-build-deps*.buildinfo', + 'ondemand-build-deps*.changes' + ] expect(build).to receive(:sh).with('sudo apt update -y 2>/dev/null 1>/dev/null') expect(build).to receive(:sh).with(expected_cmd.join(' ')) + expect(build).to receive(:sh).with("rm -f #{cleanup.join(' ')} 2>/dev/null 1>/dev/null") build.install_dependencies! end end