From 1c62e0ae4efad190477f6464e56cd97fee87cbb5 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Fri, 3 Oct 2014 22:24:14 +0000 Subject: [PATCH] Remove registry v2 code path As this feature requires more testing it is much safter to get the underlying changes into the codebase first then enable the feature in another release after proper testing and verification can be done. Signed-off-by: Michael Crosby --- graph/pull.go | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/graph/pull.go b/graph/pull.go index d419b4f7ca..4e7d78f8f1 100644 --- a/graph/pull.go +++ b/graph/pull.go @@ -75,6 +75,7 @@ func (s *TagStore) CmdPull(job *engine.Job) engine.Status { if n := len(job.Args); n != 1 && n != 2 { return job.Errorf("Usage: %s IMAGE [TAG]", job.Name) } + var ( localName = job.Args[0] tag string @@ -83,6 +84,7 @@ func (s *TagStore) CmdPull(job *engine.Job) engine.Status { metaHeaders map[string][]string mirrors []string ) + if len(job.Args) > 1 { tag = job.Args[1] } @@ -132,18 +134,6 @@ func (s *TagStore) CmdPull(job *engine.Job) engine.Status { mirrors = s.mirrors } - if 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) - } - - if err := s.pullV2Repository(job.Eng, r, job.Stdout, localName, remoteName, tag, sf, job.GetenvBool("parallel")); err == nil { - return engine.StatusOK - } else if err != registry.ErrDoesNotExist { - log.Errorf("Error from V2 registry: %s", err) - } - } if err = s.pullRepository(r, job.Stdout, localName, remoteName, tag, sf, job.GetenvBool("parallel"), mirrors); err != nil { return job.Error(err) }