From 45e09641f735f91b6bfe0b2d2f5ce7101a44b07d Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Wed, 14 Jan 2015 17:14:14 -0800 Subject: [PATCH] Remove session backup The v2 session code will no longer update the indexEndpoint value, therefore it is not necessary to save and restore the value for use with v1. Signed-off-by: Derek McGowan (github: dmcgowan) Upstream-commit: f11f3f6203da596f50eec0edc3c5dfb8c93bc271 Component: engine --- components/engine/graph/pull.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/components/engine/graph/pull.go b/components/engine/graph/pull.go index d0fca38b3c..6129ea39a1 100644 --- a/components/engine/graph/pull.go +++ b/components/engine/graph/pull.go @@ -72,10 +72,6 @@ func (s *TagStore) CmdPull(job *engine.Job) engine.Status { logName += ":" + tag } - // Calling the v2 code path might change the session - // endpoint value, so save the original one! - originalSession := *r - if len(repoInfo.Index.Mirrors) == 0 && (repoInfo.Index.Official || endpoint.Version == registry.APIVersion2) { j := job.Eng.Job("trust_update_base") if err = j.Run(); err != nil { @@ -95,8 +91,6 @@ func (s *TagStore) CmdPull(job *engine.Job) engine.Status { log.Debug("image does not exist on v2 registry, falling back to v1") } - r = &originalSession - log.Debugf("pulling v1 repository with local name %q", repoInfo.LocalName) if err = s.pullRepository(r, job.Stdout, repoInfo, tag, sf, job.GetenvBool("parallel")); err != nil { return job.Error(err)