* Creating a file nix-support/no-scan in the output path of a
derivation disables scanning for dependencies. Use at your own risk. This is a quick hack to speed up UML image generation (image are very big, say 1 GB). It would be better if the scanner were faster, and didn't read the whole file into memory.
This commit is contained in:
		
							parent
							
								
									18ebd7b030
								
							
						
					
					
						commit
						e3a50f7e25
					
				
					 2 changed files with 6 additions and 3 deletions
				
			
		|  | @ -1049,8 +1049,11 @@ void NormalisationGoal::createClosure() | ||||||
| 	   in it. */ | 	   in it. */ | ||||||
|         startNest(nest2, lvlChatty, |         startNest(nest2, lvlChatty, | ||||||
|             format("scanning for store references in `%1%'") % path); |             format("scanning for store references in `%1%'") % path); | ||||||
|         Strings refPaths = filterReferences(path,  |         Strings refPaths; | ||||||
|             Strings(allPaths.begin(), allPaths.end())); |         if (!pathExists(path + "/nix-support/no-scan")) { | ||||||
|  |             refPaths = filterReferences(path,  | ||||||
|  |                 Strings(allPaths.begin(), allPaths.end())); | ||||||
|  |         } | ||||||
|         nest2.close(); |         nest2.close(); | ||||||
| 
 | 
 | ||||||
| 	/* Construct a closure element for this output path. */ | 	/* Construct a closure element for this output path. */ | ||||||
|  |  | ||||||
|  | @ -115,7 +115,7 @@ bool pathExists(const Path & path) | ||||||
|     struct stat st; |     struct stat st; | ||||||
|     res = lstat(path.c_str(), &st); |     res = lstat(path.c_str(), &st); | ||||||
|     if (!res) return true; |     if (!res) return true; | ||||||
|     if (errno != ENOENT) |     if (errno != ENOENT && errno != ENOTDIR) | ||||||
|         throw SysError(format("getting status of %1%") % path); |         throw SysError(format("getting status of %1%") % path); | ||||||
|     return false; |     return false; | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue