diff options
author | Tim Smith <tsmith@chef.io> | 2018-12-04 16:35:40 -0800 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-12-05 14:58:35 -0800 |
commit | 3110d75462ebe5819d7d26c0ba95cbbaca17ef3e (patch) | |
tree | 6f77b5ecd858002416188c085a2383eed74e3de1 | |
parent | fa9aab7765dfd09e1256ee3397a2b5915433b409 (diff) | |
download | chef-3110d75462ebe5819d7d26c0ba95cbbaca17ef3e.tar.gz |
Pin the ohai definition to use the ohai version from Gemfile.lock
Without this we end up with chef-client's definition using the version
of ohai in the gemfile.lock and the ohai defintion using whatever is in
master. This is bad for two reasons:
1. we're shipping an unreleased master version even when we ship chef 13
or chef 14
2. we ship the ohai gem twice which takes up space on disk
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | omnibus_overrides.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/omnibus_overrides.rb b/omnibus_overrides.rb index 8664617310..4b1fa0163d 100644 --- a/omnibus_overrides.rb +++ b/omnibus_overrides.rb @@ -23,3 +23,8 @@ override "util-macros", version: "1.19.0" override "xproto", version: "7.0.28" override "zlib", version: "1.2.11" override "openssl", version: "1.0.2q" + +# this pins the ohai omnibus definition ohai version to the same version that's +# in the gemfile.lock, which is what the chef defition will end up using. If we +# don't pin in this file we get master, which isn't the released version (usually) +override "ohai", version: ::File.readlines("Gemfile.lock", File.expand_path(File.dirname(__FILE__))).find { |l| l =~ /^\s+ohai \((\d+\.\d+\.\d+)\)/ }; $1 |