Skip to content

Commit

Permalink
Merge pull request #1113 from slact/archlinux_groups_fix
Browse files Browse the repository at this point in the history
'group' field may be absent in a pacman package, which prevented a valid build
  • Loading branch information
jordansissel authored Jun 20, 2016
2 parents 7e91faf + 4600b78 commit e0ec0f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/fpm/package/pacman.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def input(pacman_pkg_path)
# Speaking of just taking the first entry of the field:
# A crude thing to do, but I suppose it's better than nothing.
# -- Daniel Haskin, 3/24/2015
self.category = control["group"][0] || self.category
self.category = control["group"] && control["group"][0] || self.category

# Licenses could include more than one.
# Speaking of just taking the first entry of the field:
Expand All @@ -164,6 +164,10 @@ def input(pacman_pkg_path)
end

self.dependencies = control["depend"] || self.dependencies

if attributes[:no_auto_depends?]
self.dependencies = []
end

self.attributes[:pacman_optional_depends] = control["optdepend"] || []
# There are other available attributes, but I didn't include them because:
Expand Down

0 comments on commit e0ec0f3

Please sign in to comment.