Skip to content

Commit

Permalink
handle errors during dh_shlibdeps
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed Feb 11, 2012
1 parent c48f8b6 commit 9c0d65b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/debian_formula.rb
Expand Up @@ -282,10 +282,15 @@ def package
Dir.chdir tmpdir do
FileUtils.mkdir_p 'debian'
File.open('debian/control','w'){ |f| f.puts "Source: shlibs\nPackage: shlibs" }
safe_system 'dh_shlibdeps', "-P#{destdir}"
out = `dh_shlibdeps -P#{destdir} 2>&1`
if $?.exitstatus != 0
opoo "Auto-calculation of shared library dependencies failed\n #{out.split("\n").join("\n ")}"
end

File.read('debian/substvars').strip.gsub('shlibs:Depends=', '').split(', ').each do |dep|
opts += ["--depends", dep]
if File.exists?('debian/substvars')
File.read('debian/substvars').strip.gsub('shlibs:Depends=', '').split(', ').each do |dep|
opts += ["--depends", dep]
end
end
end
ensure
Expand Down

0 comments on commit 9c0d65b

Please sign in to comment.