Explorar o código

Skip V2 registry and immediately fallback to V1 when mirrors are provided

Since V2 registry does not yet implement mirrors, when mirrors are given automatically fallback to V1 without checking V2 first.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Derek McGowan %!s(int64=10) %!d(string=hai) anos
pai
achega
9d6391a9eb
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      graph/pull.go

+ 1 - 1
graph/pull.go

@@ -139,7 +139,7 @@ func (s *TagStore) CmdPull(job *engine.Job) engine.Status {
 		mirrors = s.mirrors
 		mirrors = s.mirrors
 	}
 	}
 
 
-	if isOfficial || endpoint.Version == registry.APIVersion2 {
+	if len(mirrors) == 0 && (isOfficial || endpoint.Version == registry.APIVersion2) {
 		j := job.Eng.Job("trust_update_base")
 		j := job.Eng.Job("trust_update_base")
 		if err = j.Run(); err != nil {
 		if err = j.Run(); err != nil {
 			return job.Errorf("error updating trust base graph: %s", err)
 			return job.Errorf("error updating trust base graph: %s", err)