@@ -147,8 +147,8 @@ def initialize(lockfile, dependencies, sources, unlock, ruby_version = nil, opti
147147
148148 @current_platform_missing = add_current_platform unless Bundler . frozen_bundle?
149149
150- @path_changes = converge_paths
151150 @source_changes = converge_sources
151+ @path_changes = converge_paths
152152
153153 if conservative
154154 @gems_to_unlock = @explicit_unlocks . any? ? @explicit_unlocks : @dependencies . map ( &:name )
@@ -563,6 +563,7 @@ def something_changed?
563563 @local_changes ||
564564 @missing_lockfile_dep ||
565565 @unlocking_bundler ||
566+ @locked_spec_with_missing_checksums ||
566567 @locked_spec_with_missing_deps ||
567568 @locked_spec_with_invalid_deps
568569 end
@@ -815,6 +816,7 @@ def change_reason
815816 [ @local_changes , "the gemspecs for git local gems changed" ] ,
816817 [ @missing_lockfile_dep , "your lockfile is missing \" #{ @missing_lockfile_dep } \" " ] ,
817818 [ @unlocking_bundler , "an update to the version of Bundler itself was requested" ] ,
819+ [ @locked_spec_with_missing_checksums , "your lockfile is missing a CHECKSUMS entry for \" #{ @locked_spec_with_missing_checksums } \" " ] ,
818820 [ @locked_spec_with_missing_deps , "your lockfile includes \" #{ @locked_spec_with_missing_deps } \" but not some of its dependencies" ] ,
819821 [ @locked_spec_with_invalid_deps , "your lockfile does not satisfy dependencies of \" #{ @locked_spec_with_invalid_deps } \" " ] ,
820822 ] . select ( &:first ) . map ( &:last ) . join ( ", " )
@@ -873,21 +875,27 @@ def converge_locals
873875 def check_lockfile
874876 @locked_spec_with_invalid_deps = nil
875877 @locked_spec_with_missing_deps = nil
878+ @locked_spec_with_missing_checksums = nil
876879
877- missing = [ ]
880+ missing_deps = [ ]
881+ missing_checksums = [ ]
878882 invalid = [ ]
879883
880884 @locked_specs . each do |s |
885+ missing_checksums << s if @locked_checksums && s . source . checksum_store . missing? ( s )
886+
881887 validation = @locked_specs . validate_deps ( s )
882888
883- missing << s if validation == :missing
889+ missing_deps << s if validation == :missing
884890 invalid << s if validation == :invalid
885891 end
886892
887- if missing . any?
888- @locked_specs . delete ( missing )
893+ @locked_spec_with_missing_checksums = missing_checksums . first . name if missing_checksums . any?
894+
895+ if missing_deps . any?
896+ @locked_specs . delete ( missing_deps )
889897
890- @locked_spec_with_missing_deps = missing . first . name
898+ @locked_spec_with_missing_deps = missing_deps . first . name
891899 end
892900
893901 if invalid . any?
0 commit comments