Skip substituters with an incompatible store directory
This commit is contained in:
		
							parent
							
								
									cf198952d0
								
							
						
					
					
						commit
						e24e2caaaf
					
				
					 2 changed files with 7 additions and 0 deletions
				
			
		| 
						 | 
					@ -3132,6 +3132,11 @@ void SubstitutionGoal::tryNext()
 | 
				
			||||||
    sub = subs.front();
 | 
					    sub = subs.front();
 | 
				
			||||||
    subs.pop_front();
 | 
					    subs.pop_front();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (sub->storeDir != worker.store.storeDir) {
 | 
				
			||||||
 | 
					        tryNext();
 | 
				
			||||||
 | 
					        return;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    try {
 | 
					    try {
 | 
				
			||||||
        // FIXME: make async
 | 
					        // FIXME: make async
 | 
				
			||||||
        info = sub->queryPathInfo(storePath);
 | 
					        info = sub->queryPathInfo(storePath);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -787,6 +787,7 @@ PathSet LocalStore::querySubstitutablePaths(const PathSet & paths)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    PathSet res;
 | 
					    PathSet res;
 | 
				
			||||||
    for (auto & sub : getDefaultSubstituters()) {
 | 
					    for (auto & sub : getDefaultSubstituters()) {
 | 
				
			||||||
 | 
					        if (sub->storeDir != storeDir) continue;
 | 
				
			||||||
        if (!sub->wantMassQuery()) continue;
 | 
					        if (!sub->wantMassQuery()) continue;
 | 
				
			||||||
        for (auto & path : paths) {
 | 
					        for (auto & path : paths) {
 | 
				
			||||||
            if (res.count(path)) continue;
 | 
					            if (res.count(path)) continue;
 | 
				
			||||||
| 
						 | 
					@ -804,6 +805,7 @@ void LocalStore::querySubstitutablePathInfos(const PathSet & paths,
 | 
				
			||||||
    SubstitutablePathInfos & infos)
 | 
					    SubstitutablePathInfos & infos)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    for (auto & sub : getDefaultSubstituters()) {
 | 
					    for (auto & sub : getDefaultSubstituters()) {
 | 
				
			||||||
 | 
					        if (sub->storeDir != storeDir) continue;
 | 
				
			||||||
        for (auto & path : paths) {
 | 
					        for (auto & path : paths) {
 | 
				
			||||||
            if (infos.count(path)) continue;
 | 
					            if (infos.count(path)) continue;
 | 
				
			||||||
            debug(format("checking substituter ‘%s’ for path ‘%s’")
 | 
					            debug(format("checking substituter ‘%s’ for path ‘%s’")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue