bernd / fpm-cookery

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

Omnibus recipes no longer build #127

Closed boc-tothefuture closed 8 years ago

boc-tothefuture commented 9 years ago

I believe this commit https://github.com/bernd/fpm-cookery/commit/1e5856a25888118356645111cfd76f3c5b6a07ca broke omnibus recipes.

Here is the output I now receive with an omnibus recipe

==> default: /usr/lib64/ruby/gems/2.1.0/gems/fpm-cookery-0.29.0/lib/fpm/cookery/path.rb:21:in `/'
==> default: : undefined method `gsub' for #<FPM::Cookery::Path:/tmp/fpm-temp/tmp-build> (NoMethodError)
==> default:    from /usr/lib64/ruby/gems/2.1.0/gems/fpm-cookery-0.29.0/lib/fpm/cookery/recipe.rb:131:in `builddir'
==> default:    from /usr/lib64/ruby/gems/2.1.0/gems/fpm-cookery-0.29.0/lib/fpm/cookery/packager.rb:124:in `block in dispense'
==> default:    from /usr/lib64/ruby/gems/2.1.0/gems/fpm-cookery-0.29.0/lib/fpm/cookery/packager.rb:115:in `chdir'
==> default:    from /usr/lib64/ruby/gems/2.1.0/gems/fpm-cookery-0.29.0/lib/fpm/cookery/packager.rb:115:in `dispense'
==> default:    from /usr/lib64/ruby/gems/2.1.0/gems/fpm-cookery-0.29.0/lib/fpm/cookery/omnibus_packager.rb:80:in `run'
==> default:    from /usr/lib64/ruby/gems/2.1.0/gems/fpm-cookery-0.29.0/lib/fpm/cookery/cli.rb:109:in `exec'
==> default:    from /usr/lib64/ruby/gems/2.1.0/gems/fpm-cookery-0.29.0/lib/fpm/cookery/cli.rb:77:in `block in execute'
==> default:    from /usr/lib64/ruby/gems/2.1.0/gems/fpm-cookery-0.29.0/lib/fpm/cookery/book.rb:16:in `call'
==> default:    from /usr/lib64/ruby/gems/2.1.0/gems/fpm-cookery-0.29.0/lib/fpm/cookery/book.rb:16:in `load_recipe'
==> default:    from /usr/lib64/ruby/gems/2.1.0/gems/fpm-cookery-0.29.0/lib/fpm/cookery/cli.rb:73:in `execute'
==> default:    from /usr/lib64/ruby/gems/2.1.0/gems/clamp-0.6.5/lib/clamp/command.rb:67:in `run'
==> default:    from /usr/lib64/ruby/gems/2.1.0/gems/clamp-0.6.5/lib/clamp/subcommand/execution.rb:11:in `execute'
==> default:    from /usr/lib64/ruby/gems/2.1.0/gems/clamp-0.6.5/lib/clamp/command.rb:67:in `run'
==> default:    from /usr/lib64/ruby/gems/2.1.0/gems/clamp-0.6.5/lib/clamp/command.rb:132:in `run'
==> default:    from /usr/lib64/ruby/gems/2.1.0/gems/fpm-cookery-0.29.0/bin/fpm-cook:7:in `<top (required)>'
==> default:    from /usr/bin/fpm-cook:23:in `load'
==> default:    from /usr/bin/fpm-cook:23:in `<main>'

I think its specifically this line: recipe.run_lifecycle_hook(:after_source_extraction, recipe.builddir(extracted_source))

beddari commented 8 years ago

Yup, I got that too. With the recent spur of activity in the project we should perhaps focus on writing a few more tests :-) e.g to cover this. Hoping to be able to help out with that ...

boc-tothefuture commented 8 years ago

@bernd I don't really understand the new hook system all that well to be able to resolve this myself.. In my forked copy I just removed the hook.. But I assume that is not what we want?

bernd commented 8 years ago

Can you show me the recipe you are using and which version? Your backtrace says: fpm-cookery-0.29.0

I cannot reproduce this with 0.30.0 and the recipes/omnibustest recipe.

bernd commented 8 years ago

I was able to reproduce it by adding builddir/builddir to a recipe. ;)

Fixed in 9cb419c

Thank you for the report!

bernd commented 8 years ago

@brian-oconnell I just released 0.30.1, please try that.