Skip to content

Commit

Permalink
Skip certain control file entries if their lists are empty.
Browse files Browse the repository at this point in the history
For #1126
  • Loading branch information
TomyLobo authored and jordansissel committed Jun 18, 2016
1 parent 531f349 commit 7e91faf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions templates/deb.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ Depends: <%= dependencies.collect { |d| fix_dependency(d) }.flatten.join(", ") %
<% if !conflicts.empty? -%>
Conflicts: <%= conflicts.collect { |d| fix_dependency(d) }.flatten.join(", ") %>
<% end -%>
<% if attributes[:deb_breaks] -%>
<% if attributes[:deb_breaks] and !attributes[:deb_breaks].empty? -%>
Breaks: <%= attributes[:deb_breaks].collect { |d| fix_dependency(d) }.flatten.join(", ") %>
<% end -%>
<% if attributes[:deb_pre_depends_given?] -%>
<% if attributes[:deb_pre_depends] and !attributes[:deb_pre_depends].empty? -%>
Pre-Depends: <%= attributes[:deb_pre_depends].collect { |d| fix_dependency(d) }.flatten.join(", ") %>
<% end -%>
<% if attributes[:deb_build_depends_given?] -%>
<% if attributes[:deb_build_depends] and !attributes[:deb_build_depends].empty? -%>
Build-Depends: <%= attributes[:deb_build_depends].collect { |d| fix_dependency(d) }.flatten.join(", ") %>
<% end -%>
<% if !provides.empty? -%>
Expand All @@ -30,10 +30,10 @@ Provides: <%= provides.map {|p| p.split(" ").first}.join ", " %>
<% if !replaces.empty? -%>
Replaces: <%= replaces.join(", ") %>
<% end -%>
<% if attributes[:deb_recommends_given?] -%>
<% if attributes[:deb_recommends] and !attributes[:deb_recommends].empty? -%>
Recommends: <%= attributes[:deb_recommends].collect { |d| fix_dependency(d) }.flatten.join(", ") %>
<% end -%>
<% if attributes[:deb_suggests_given?] -%>
<% if attributes[:deb_suggests] and !attributes[:deb_suggests].empty? -%>
Suggests: <%= attributes[:deb_suggests].collect { |d| fix_dependency(d) }.flatten.join(", ") %>
<% end -%>
Section: <%= category %>
Expand Down

0 comments on commit 7e91faf

Please sign in to comment.