diff --git a/Gemfile.lock b/Gemfile.lock index b7fc180..05c366b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - ood_packaging (0.13.3) + ood_packaging (0.13.4) rake (~> 13.0.1) GEM diff --git a/lib/ood_packaging/build.rb b/lib/ood_packaging/build.rb index fb7a3bc..7ec9d4e 100644 --- a/lib/ood_packaging/build.rb +++ b/lib/ood_packaging/build.rb @@ -277,7 +277,9 @@ def install_rpm_dependencies! def install_deb_dependencies! sh "sudo apt update -y#{cmd_suffix}" extra_depends = config.fetch(:extra_depends, nil) - unless extra_depends.nil? + if extra_depends.nil? + extra_depends = '' + else extra_depends = extra_depends.split(',').map(&:strip) if extra_depends.is_a?(String) extra_depends.unshift('') extra_depends = extra_depends.join(', ') @@ -296,7 +298,7 @@ def install_deb_dependencies! "#{package}-build-deps*.changes" ] Dir.chdir(deb_work_dir) do - sh "sed -i 's|@EXTRA_DEPENDS@|#{extra_depends}|g' debian/control#{cmd_suffix}" unless extra_depends.nil? + sh "sed -i 's|@EXTRA_DEPENDS@|#{extra_depends}|g' debian/control#{cmd_suffix}" sh "#{cmd.join(' ')}#{cmd_suffix}" sh "rm -f #{cleanup.join(' ')}#{cmd_suffix}" end diff --git a/lib/ood_packaging/version.rb b/lib/ood_packaging/version.rb index 9f6bfbe..d3e2ce5 100644 --- a/lib/ood_packaging/version.rb +++ b/lib/ood_packaging/version.rb @@ -2,7 +2,7 @@ # Version code for OodPackaging module OodPackaging - VERSION = '0.13.3' + VERSION = '0.13.4' PACKAGE_VERSION = { 'ondemand-release' => { '(ubuntu|debian)' => '3.1.0', diff --git a/spec/ood_packaging/build_spec.rb b/spec/ood_packaging/build_spec.rb index c19949f..265adbd 100644 --- a/spec/ood_packaging/build_spec.rb +++ b/spec/ood_packaging/build_spec.rb @@ -168,7 +168,7 @@ it 'installs DEB dependencies using apt' do expect(build).to receive(:sh).with('sudo apt update -y 2>/dev/null 1>/dev/null') - expect(build).not_to receive(:sh).with(/^sed.+/) + expect(build).to receive(:sh).with("sed -i 's|@EXTRA_DEPENDS@||g' debian/control#{cmd_suffix}") 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!