Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reworked generation of cookie names to include recipe.revision #157

Merged
merged 1 commit into from Jul 22, 2016

Conversation

@tomeon
Copy link
Contributor

tomeon commented Jul 11, 2016

I hit an issue building a package with an updated revision -- because the extact cookie from a previous build with a different revision number was still hanging around, fpm-cookery didn't copy the updated source to builddir and the resulting package contained out-of-date code. This PR alters FPM::Cookery::Packager so that the build and extract cookies contain recipe.revision, if defined, in addition to recipe.name and recipe.version.


I also extended SourceHandler#handler_to_class to verify that the const_get lookup returns the name of a class that implements extract and fetch. My test build failed because I used source /a/path, :with => :dir rather than source /a/path, :with => :directory, and handler_to_class loaded the core Dir class.


One other thing -- I changed the packager to always run FileUtils.touch(build_cookie) -- it seems to me that Recipe#build shouldn't need to return true in order to indicate a successful build; anything that doesn't raise an exception should be fine.

Matt Schreiber Matt Schreiber
and added check to SourceHandler#handler_to_class that ensures requested class implements the necessary methods
@tomeon

This comment has been minimized.

Copy link
Contributor Author

tomeon commented Jul 13, 2016

Hm, looks like the Travis build for Ruby 1.9 failed due to jordansissel/fpm#1146 / jordansissel/fpm#1147? Not entirely certain -- looking at the bundle install output in the Travis build console, I don't see any mention of fpm itself, just json.

@bernd

This comment has been minimized.

Copy link
Owner

bernd commented Jul 22, 2016

Thank you!

@bernd bernd merged commit b7798ae into bernd:master Jul 22, 2016
1 check failed
1 check failed
continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
@tomeon tomeon deleted the tomeon:cookie-names branch Aug 7, 2016
tomeon pushed a commit to tomeon/fpm-cookery that referenced this pull request Oct 23, 2016
* 'master' of github.com:BaxterStockman/fpm-cookery:
  Add default package version and guard against nil/empty versions (bernd#176)
  Ensure consistent extracted source value from all source handlers
  Make vendor delimiter configurable
  Avoid cache with directory source handler and check absolute path
  Also peg json_pure version to run on Ruby 1.9.3 again
  Fix example for inspect command
  Pegged json dependency to version compatible with pre-2.0 Rubies (bernd#166)
  Add `inspect` subcommand (bernd#165)
  Fix typo and add missing tests (bernd#163)
  Add alpine (apk) support (bernd#162)
  Rejiggered Facter-related code to use Facter.value rather than Facter.fact
  Reworked generation of cookie names (bernd#157)
  Add lsbcodename (bernd#158)
bernd added a commit that referenced this pull request Jul 9, 2017
Changes:

* Hiera lookups of recipe data from templated YAML files. (BaxterStockman / #150)
* Travis-CI build matrix improvements. (thedrow / #155)
* Expose `lsbcodename` fact. (thedrow / #158)
* Improved build cookie generator. (BaxterStockman / #157)
* Improved facter usage. (BaxterStockman / #167)
* Alpine (apk) package support. (lloydpick / #162)
* Fix typos and missing tests. (lloydpick / #163)
* Add `inspect` command. (BaxterStockman / #165)
* json dependency fix to work with older Rubies. (BaxterStockman / #166)
* Bug fix when using local directory sources. (#164)
* Make vendor delimiter configurable. (#169)
* Ensure consistend extracted source value from all source handlers. (#170)
* Add default package version and guard against nil/empty versions. (BaxterStockman / #176)
* Documenting the use of Hiera in recipes. (BaxterStockman / #184)
* Ruby pre-2.0 compatibility fix. (BaxterStockman / #183)
* Add "safe\_yaml" dependency. (davewongillies / #186, #154)
* Add `rpm_dist` method. (sfzylad / #190)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.