Browse code

Merge pull request #10539 from dmcgowan/v2-registry-revert-push

Revert push to v2 official registry

Arnaud Porterie authored on 2015/02/05 03:01:26
Showing 2 changed files
... ...
@@ -72,7 +72,7 @@ func (s *TagStore) CmdPull(job *engine.Job) engine.Status {
72 72
 		logName += ":" + tag
73 73
 	}
74 74
 
75
-	if len(repoInfo.Index.Mirrors) == 0 && (repoInfo.Index.Official || endpoint.Version == registry.APIVersion2) {
75
+	if len(repoInfo.Index.Mirrors) == 0 && ((repoInfo.Official && repoInfo.Index.Official) || endpoint.Version == registry.APIVersion2) {
76 76
 		j := job.Eng.Job("trust_update_base")
77 77
 		if err = j.Run(); err != nil {
78 78
 			log.Errorf("error updating trust base graph: %s", err)
... ...
@@ -455,7 +455,7 @@ func (s *TagStore) CmdPush(job *engine.Job) engine.Status {
455 455
 		return job.Error(err2)
456 456
 	}
457 457
 
458
-	if repoInfo.Index.Official || endpoint.Version == registry.APIVersion2 {
458
+	if endpoint.Version == registry.APIVersion2 {
459 459
 		err := s.pushV2Repository(r, job.Eng, job.Stdout, repoInfo, tag, sf)
460 460
 		if err == nil {
461 461
 			return engine.StatusOK