    # File lib/chef/cookbook_version.rb, line 625
        def preferred_manifest_record(node, segment, filename)
          preferences = preferences_for_path(node, segment, filename)

          # ensure that we generate the manifest, which will also generate
          # @manifest_records_by_path
          manifest

          # in order of prefernce, look for the filename in the manifest
          found_pref = preferences.find {|preferred_filename| @manifest_records_by_path[preferred_filename] }
          if found_pref
            @manifest_records_by_path[found_pref]
          else
            raise Chef::Exceptions::FileNotFound, "cookbook #{name} does not contain file #{segment}/#{filename}"
          end
        end