bernd / fpm-cookery

A tool for building software packages with fpm.
Other
460 stars 88 forks source link

Ignoring build_depends? #9

Closed arunthampi closed 11 years ago

arunthampi commented 12 years ago

Does the fpm-cookery lib use the build_depends directive? I noticed that the YAML is broken in ruby package that I built using fpm-recipes. When I require 'yaml' in the irb build by fpm-cookery, it breaks.

Upon closer inspection, I noticed that libyaml-dev is not installed even though it is mentioned as a part of build_depends in the Ruby 1.9.3 recipe.

In the FPM::Cookery::Packager class, I noticed that these two lines:

RecipeInspector.verify!(recipe)
DependencyInspector.verify!(recipe.depends, recipe.build_depends)

are ignored, and that the DependencyInspector class does not exist.

bernd commented 12 years ago

Yes, that's correct. The build_depends are currently ignored. There is no implementation yet. Sorry!

arunthampi commented 12 years ago

Ok, thanks for confirming. I'll try and make a patch in the coming weeks (if you aren't working on it already)

andytinycat commented 11 years ago

Have you thought about using Puppet catalogs programatically to do build_depends/depends?

E.g. you can create a catalog with package resources and ensure they're installed/the correct version using Puppet's providers, rather than duplicating the effort of writing code to do this. It also means you can work across distros without needing to test a huge amount (cos Puppet folks will do that for you). You're already using half of Puppetlabs' work by using Facter :)

It also opens the door to having build_depends as an actual "run stage", where you can ensure other things happen (like creating a user, for example). I've been building a Munin node package for Ubuntu, and it would have been really helpful to do it like this.

I'm happy to fork and submit a pull request if you think the idea is sound.

bernd commented 11 years ago

@andytinycat made it happen! :) Support for installing dependencies is in the master branch.