Add Store::dumpPath() method
This allows applying nix-store --verify-path to binary cache stores: NIX_REMOTE=https://cache.nixos.org nix-store --verify-path /nix/store/s5c7...
This commit is contained in:
		
							parent
							
								
									87295b9844
								
							
						
					
					
						commit
						1c5f73f529
					
				
					 7 changed files with 29 additions and 7 deletions
				
			
		|  | @ -783,7 +783,9 @@ static void opVerifyPath(Strings opFlags, Strings opArgs) | |||
|         Path path = followLinksToStorePath(i); | ||||
|         printMsg(lvlTalkative, format("checking path ‘%1%’...") % path); | ||||
|         ValidPathInfo info = store->queryPathInfo(path); | ||||
|         HashResult current = hashPath(info.narHash.type, path); | ||||
|         HashSink sink(info.narHash.type); | ||||
|         store->dumpPath(path, sink); | ||||
|         auto current = sink.finish(); | ||||
|         if (current.first != info.narHash) { | ||||
|             printMsg(lvlError, | ||||
|                 format("path ‘%1%’ was modified! expected hash ‘%2%’, got ‘%3%’") | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue