Skip to content

Commit

Permalink
Cleanup problematic files
Browse files Browse the repository at this point in the history
  • Loading branch information
treydock committed Oct 13, 2023
1 parent f82303c commit e11470a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/ood_packaging/build.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions spec/ood_packaging/build_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e11470a

Please sign in to comment.