From 87f59e3802a44aecdb8febfd34a9661e136ffcf4 Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Thu, 23 Oct 2014 15:26:52 -0700 Subject: [PATCH] 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 (github: dmcgowan) --- graph/pull.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graph/pull.go b/graph/pull.go index c1db605b89..05d5ec7654 100644 --- a/graph/pull.go +++ b/graph/pull.go @@ -137,7 +137,7 @@ func (s *TagStore) CmdPull(job *engine.Job) engine.Status { 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") if err = j.Run(); err != nil { return job.Errorf("error updating trust base graph: %s", err)