RiotGames/berkshelf — pull request #772 by b-dean (2013-07-22 16:32:41+00:00)
Title: Fix issue where location is nil for cookbook that is in the cache

This shows up with vagrant-berkshelf when you have more than one chef-client provisioner. More generically it happens any time you run two different Resolver instances against the same Berksfile. For example:

require 'berkshelf'

class Berkshelf::Berksfile
def public_apply_lockfile
apply_lockfile(sources({}))
end
end

b = Berkshelf::Berksfile.from_file('Berksfile')

resolver = Berkshelf::Resolver.new(
b,
sources: b.public_apply_lockfile,
skip_dependencies: nil
)

resolver = Berkshelf::Resolver.new(
b,
sources: b.public_apply_lockfile,
skip_dependencies: nil
)

fixes #718