Change the meaning of info.ultimate
It now means "paths that were built locally". It no longer includes paths that were added locally. For those we don't need info.ultimate, since we have the content-addressability assertion (info.ca).
This commit is contained in:
		
							parent
							
								
									45d7b1a9e9
								
							
						
					
					
						commit
						6f245bf24a
					
				
					 2 changed files with 2 additions and 5 deletions
				
			
		|  | @ -1010,7 +1010,6 @@ Path LocalStore::addToStoreFromDump(const string & dump, const string & name, | ||||||
|             info.path = dstPath; |             info.path = dstPath; | ||||||
|             info.narHash = hash.first; |             info.narHash = hash.first; | ||||||
|             info.narSize = hash.second; |             info.narSize = hash.second; | ||||||
|             info.ultimate = true; |  | ||||||
|             info.ca = makeFixedOutputCA(recursive, h); |             info.ca = makeFixedOutputCA(recursive, h); | ||||||
|             registerValidPath(info); |             registerValidPath(info); | ||||||
|         } |         } | ||||||
|  | @ -1073,7 +1072,6 @@ Path LocalStore::addTextToStore(const string & name, const string & s, | ||||||
|             info.narHash = narHash; |             info.narHash = narHash; | ||||||
|             info.narSize = sink.s->size(); |             info.narSize = sink.s->size(); | ||||||
|             info.references = references; |             info.references = references; | ||||||
|             info.ultimate = true; |  | ||||||
|             info.ca = "text:" + hash.to_string(); |             info.ca = "text:" + hash.to_string(); | ||||||
|             registerValidPath(info); |             registerValidPath(info); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  | @ -113,9 +113,8 @@ struct ValidPathInfo | ||||||
|     uint64_t narSize = 0; // 0 = unknown
 |     uint64_t narSize = 0; // 0 = unknown
 | ||||||
|     uint64_t id; // internal use only
 |     uint64_t id; // internal use only
 | ||||||
| 
 | 
 | ||||||
|     /* Whether the path is ultimately trusted, that is, it was built
 |     /* Whether the path is ultimately trusted, that is, it's a
 | ||||||
|        locally or is content-addressable (e.g. added via addToStore() |        derivation output that was built locally. */ | ||||||
|        or the result of a fixed-output derivation). */ |  | ||||||
|     bool ultimate = false; |     bool ultimate = false; | ||||||
| 
 | 
 | ||||||
|     StringSet sigs; // note: not necessarily verified
 |     StringSet sigs; // note: not necessarily verified
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue