commit:     3b25fb394a86ae1d697c214c3cb158d8e9254b08
Author:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 14 16:45:05 2018 +0000
Commit:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
CommitDate: Fri Dec 14 16:45:05 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b25fb39

app-admin/helm: Apply patch to fix sorting

Signed-off-by: Manuel Rüger <mrueg <AT> gentoo.org>
Package-Manager: Portage-2.3.52, Repoman-2.3.11

 app-admin/helm/files/helm-2.12.0-sorting.patch     | 90 ++++++++++++++++++++++
 app-admin/helm/helm-2.11.0.ebuild                  |  2 +-
 .../{helm-2.11.0.ebuild => helm-2.12.0-r1.ebuild}  | 46 ++++++-----
 3 files changed, 116 insertions(+), 22 deletions(-)

diff --git a/app-admin/helm/files/helm-2.12.0-sorting.patch 
b/app-admin/helm/files/helm-2.12.0-sorting.patch
new file mode 100644
index 00000000000..560768049fd
--- /dev/null
+++ b/app-admin/helm/files/helm-2.12.0-sorting.patch
@@ -0,0 +1,90 @@
+From c9a5b0bb49b91a463c0021dd5dbe9626e2d3bb11 Mon Sep 17 00:00:00 2001
+From: Filinto Duran <dura...@gmail.com>
+Date: Fri, 14 Dec 2018 10:20:57 -0600
+Subject: [PATCH] fixes #4728 problem that arise because of the zero value of
+ unknown and the loging of kind_sorter this messes helm template when having
+ unknown (ie NOTES) or other files and the sorter catches namespace
+
+Signed-off-by: Filinto Duran <dura...@gmail.com>
+---
+ pkg/tiller/kind_sorter.go      | 13 ++++++++----
+ pkg/tiller/kind_sorter_test.go | 36 ++++++++++++++++++++++++++++++++++
+ 2 files changed, 45 insertions(+), 4 deletions(-)
+
+diff --git a/pkg/tiller/kind_sorter.go b/pkg/tiller/kind_sorter.go
+index 8aff4e6c11..7df63c6ac4 100644
+--- a/pkg/tiller/kind_sorter.go
++++ b/pkg/tiller/kind_sorter.go
+@@ -124,12 +124,13 @@ func (k *kindSorter) Less(i, j int) bool {
+       b := k.manifests[j]
+       first, aok := k.ordering[a.Head.Kind]
+       second, bok := k.ordering[b.Head.Kind]
+-      // if same kind (including unknown) sub sort alphanumeric
+-      if first == second {
+-              // if both are unknown and of different kind sort by kind 
alphabetically
+-              if !aok && !bok && a.Head.Kind != b.Head.Kind {
++      // if both are unknown
++      if !aok && !bok {
++              // and of different kind sort by kind alphabetically
++              if a.Head.Kind != b.Head.Kind {
+                       return a.Head.Kind < b.Head.Kind
+               }
++              // and of same kind sort by name alphabetically
+               return a.Name < b.Name
+       }
+       // unknown kind is last
+@@ -139,6 +140,10 @@ func (k *kindSorter) Less(i, j int) bool {
+       if !bok {
+               return true
+       }
++      // if same kind sort alphanumeric
++      if first == second {
++              return a.Name < b.Name
++      }
+       // sort different kinds
+       return first < second
+ }
+diff --git a/pkg/tiller/kind_sorter_test.go b/pkg/tiller/kind_sorter_test.go
+index 1c187e90d5..823d9674ee 100644
+--- a/pkg/tiller/kind_sorter_test.go
++++ b/pkg/tiller/kind_sorter_test.go
+@@ -223,3 +223,39 @@ func TestKindSorterSubSort(t *testing.T) {
+               })
+       }
+ }
++
++func TestKindSorterUnknownsWithNamespace(t *testing.T) {
++      // a.Kind=Namespace should win over b.Kind=Unknown even if the a.Name > 
b.Name
++      manifests := []Manifest{
++              {
++                      Name: "a",
++                      Head: &util.SimpleHead{Kind: "Namespace"},
++              },
++              {
++                      Name: "N",
++                      Head: &util.SimpleHead{Kind: "Unknown"},
++              },
++      }
++      for _, test := range []struct {
++              description string
++              order       SortOrder
++              expected    string
++      }{
++              // expectation is sorted by kind (unknown is last) and then sub 
sorted alphabetically within each group
++              {"Namespace,Unknown", InstallOrder, "aN"},
++      } {
++              var buf bytes.Buffer
++              t.Run(test.description, func(t *testing.T) {
++
++                      defer buf.Reset()
++                      m := make([]Manifest, len(manifests))
++                      copy(m, manifests)
++                      for _, r := range sortByKind(m, test.order) {
++                              buf.WriteString(r.Name)
++                      }
++                      if got := buf.String(); got != test.expected {
++                              t.Errorf("Expected %q, got %q", test.expected, 
got)
++                      }
++              })
++      }
++}

diff --git a/app-admin/helm/helm-2.11.0.ebuild 
b/app-admin/helm/helm-2.11.0.ebuild
index f20995dc61f..1fc185c4862 100644
--- a/app-admin/helm/helm-2.11.0.ebuild
+++ b/app-admin/helm/helm-2.11.0.ebuild
@@ -106,7 +106,7 @@ GIT_COMMIT="2e55dbe1fdb5fdb96b75ff144a339489417b146b"
 
 ARCHIVE_URI="https://github.com/kubernetes/helm/archive/v${MY_PV}.tar.gz -> 
${P}.tar.gz
        ${EGO_VENDOR_URI}"
-KEYWORDS="~amd64"
+KEYWORDS="amd64"
 
 DESCRIPTION="Kubernetes Package Manager"
 HOMEPAGE="https://github.com/kubernetes/helm https://helm.sh";

diff --git a/app-admin/helm/helm-2.11.0.ebuild 
b/app-admin/helm/helm-2.12.0-r1.ebuild
similarity index 81%
copy from app-admin/helm/helm-2.11.0.ebuild
copy to app-admin/helm/helm-2.12.0-r1.ebuild
index f20995dc61f..5b6f4c2c330 100644
--- a/app-admin/helm/helm-2.11.0.ebuild
+++ b/app-admin/helm/helm-2.12.0-r1.ebuild
@@ -11,21 +11,21 @@ EGO_VENDOR=(
 "cloud.google.com/go 3b1ae45394a234c385be014e9a488f2bb6eef821 
github.com/GoogleCloudPlatform/gcloud-golang"
 "github.com/aokoli/goutils 9c37978a95bd5c709a15883b6242714ea6709e64"
 "github.com/asaskevich/govalidator 7664702784775e51966f0885f5cd27435916517b"
-"github.com/Azure/go-ansiterm 19f72df4d05d31cbe1c56bfc8045c96babff6c7e"
-"github.com/Azure/go-autorest 1ff28809256a84bb6966640ff3d0371af82ccba4"
+"github.com/Azure/go-ansiterm d6e3b3328b783f23731bc4d058875b0371ff8109"
+"github.com/Azure/go-autorest bca49d5b51a50dc5bb17bbf6204c711c6dbded06"
 "github.com/beorn7/perks 3ac7bf7a47d159a033b107610db8a1b6575507a4"
-"github.com/BurntSushi/toml b26d9c308763d68093482582cea63d69be07a0f0"
+"github.com/BurntSushi/toml 3012a1dbe2e4bd1391d42b32f0577cb7bbc7f005"
 "github.com/chai2010/gettext-go c6fed771bfd517099caf0f7a961671fa8ed08723"
 "github.com/cpuguy83/go-md2man 71acacd42f85e5e82f70a55327789582a5200a90"
 "github.com/cyphar/filepath-securejoin 
a261ee33d7a517f054effbf451841abaafe3e0fd"
 "github.com/davecgh/go-spew 782f4967f2dc4564575ca782fe2d04090b5faca8"
 "github.com/dgrijalva/jwt-go 01aeca54ebda6e0fbfafd0a524d234159c05ec20"
 "github.com/docker/distribution edc3ab29cdff8694dd6feb85cfeb4b5f1b38ed9c"
-"github.com/docker/docker 4f3616fb1c112e206b88cb7a9922bf49067a7756"
+"github.com/docker/docker a9fbbdc8dd8794b20af358382ab780559bca589d"
 "github.com/docker/go-connections 3ede32e2033de7505e6500d6c868c2b9ed9f169d"
 "github.com/docker/go-units 9e638d38cf6977a37a8ea0078f3ee75a7cdb2dd1"
 "github.com/docker/spdystream 449fdfce4d962303d702fec724ef0ad181c92528"
-"github.com/evanphx/json-patch 94e38aa1586e8a6c8a75770bddf5ff84c48a106b"
+"github.com/evanphx/json-patch 36442dbdb585210f8d5a1b45e67aa323c197d5c4"
 "github.com/exponent-io/jsonpath d6023ce2651d8eafb5c75bb0c7167536102ec9f5"
 "github.com/fatih/camelcase f6a740d52f961c60348ebb109adde9f4635d7540"
 "github.com/ghodss/yaml 73d445a93680fa1a78ae23a5839bad48f32ba1ee"
@@ -48,7 +48,7 @@ EGO_VENDOR=(
 "github.com/grpc-ecosystem/go-grpc-prometheus 
0c1b191dbfe51efdabe3c14b9f6f3b96429e0722"
 "github.com/hashicorp/golang-lru a0d98a5f288019575c6d1f4bb1573fef2d1fcdc4"
 "github.com/huandu/xstrings 3959339b333561bf62a38b424fd41517c2c90f40"
-"github.com/imdario/mergo 6633656539c1639d9d78127b7d47c622b5d7b6dc"
+"github.com/imdario/mergo 9316a62528ac99aaecb4e47eadd6dc8aa6533d58"
 "github.com/inconshreveable/mousetrap 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75"
 "github.com/json-iterator/go f2b4162afba35581b6d4a50d3b8f34e33c144682"
 "github.com/mailru/easyjson 2f5df55504ebc322e4d52d34df6a1f5b503bf26d"
@@ -57,7 +57,7 @@ EGO_VENDOR=(
 "github.com/Masterminds/sprig 15f9564e7e9cf0da02a48e0d25f12a7b83559aa6"
 "github.com/Masterminds/vcs 3084677c2c188840777bff30054f2b553729d329"
 "github.com/mattn/go-runewidth d6bea18f789704b5f83375793155289da36a3c7f"
-"github.com/matttproud/golang_protobuf_extensions 
fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a"
+"github.com/matttproud/golang_protobuf_extensions 
c12348ce28de40eed0136aa2b644d0ee0650e56c"
 "github.com/mitchellh/go-wordwrap ad45545899c7b13c020ea92b2072220eefad42b8"
 "github.com/modern-go/concurrent bacd9c7ef1dd9b15be4a9909b8ac7a4e313eec94"
 "github.com/modern-go/reflect2 05fbef0ca5da472bbf96c9322b84a53edc03c9fd"
@@ -74,35 +74,36 @@ EGO_VENDOR=(
 "github.com/russross/blackfriday 300106c228d52c8941d4b3de6054a6062a86dda3"
 "github.com/shurcooL/sanitized_anchor_name 
10ef21a441db47d8b13ebcc5fd2310f636973c77"
 "github.com/sirupsen/logrus 89742aefa4b206dcf400792f3bd35b542998eb3b"
-"github.com/spf13/cobra c439c4fa093711d42e1b01acb1235b52004753c1"
-"github.com/spf13/pflag 583c0c0531f06d5278b7d917446061adc344b5cd"
+"github.com/spf13/cobra fe5e611709b0c57fa4a89136deaa8e1d4004d053"
+"github.com/spf13/pflag 298182f68c66c05229eb03ac171abe6e309ee79a"
 "github.com/technosophos/moniker a5dbd03a2245d554160e3ae6bfdcf969fe58b431"
-"golang.org/x/crypto 49796115aa4b964c318aad4f3084fdb41e9aa067 
github.com/golang/crypto"
+"golang.org/x/crypto de0752318171da717af4ce24d0a2e8626afaeb11 
github.com/golang/crypto"
 "golang.org/x/net 1c05540f6879653db88113bc4a2b70aec4bd491f 
github.com/golang/net"
 "golang.org/x/oauth2 a6bd8cefa1811bd24b86f8902872e4e8225f74c4 
github.com/golang/oauth2"
-"golang.org/x/sys 43eea11bc92608addb41b8a406b0407495c106f6 
github.com/golang/sys"
+"golang.org/x/sys 95c6576299259db960f6c5b9b69ea52422860fce 
github.com/golang/sys"
 "golang.org/x/text b19bf474d317b857955b12035d2c5acb57ce8b01 
github.com/golang/text"
 "golang.org/x/time f51c12702a4d776e4c1fa9b0fabab841babae631 
github.com/golang/time"
 "google.golang.org/appengine 12d5545dc1cfa6047a286d5e853841b6471f4c19 
github.com/golang/appengine"
 "google.golang.org/genproto 09f6ed296fc66555a25fe4ce95173148778dfa85 
github.com/google/go-genproto"
 "google.golang.org/grpc 5ffe3083946d5603a0578721101dc8165b1d5b5f 
github.com/grpc/grpc-go"
 "gopkg.in/inf.v0 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4 
github.com/go-inf/inf"
-"gopkg.in/square/go-jose.v2 f8f38de21b4dcd69d0413faf231983f5fd6634b1 
github.com/square/go-jose"
+"gopkg.in/square/go-jose.v2 89060dee6a84df9a4dae49f676f0c755037834f1 
github.com/square/go-jose"
 "gopkg.in/yaml.v2 670d4cfef0544295bc27a114dbac37980d83185a 
github.com/go-yaml/yaml"
-"k8s.io/api 2d6f90ab1293a1fb871cf149423ebb72aa7423aa github.com/kubernetes/api"
-"k8s.io/apiextensions-apiserver 898b0eda132e1aeac43a459785144ee4bf9b0a2e 
github.com/kubernetes/apiextensions-apiserver"
-"k8s.io/apimachinery 103fd098999dc9c0c88536f5c9ad2e5da39373ae 
github.com/kubernetes/apimachinery"
-"k8s.io/apiserver 8b122ec9e3bbab91a262d17a39325e69349dc44d 
github.com/kubernetes/apiserver"
-"k8s.io/client-go 59698c7d9724b0f95f9dc9e7f7dfdcc3dfeceb82 
github.com/kubernetes/client-go"
-"k8s.io/kube-openapi 91cfa479c814065e420cee7ed227db0f63a5854e 
github.com/kubernetes/kube-openapi"
-"k8s.io/kubernetes 2e809eed16445fff9dcbfc56e9936cf76ccbdadc 
github.com/kubernetes/kubernetes"
-"k8s.io/utils 258e2a2fa64568210fbd6267cf1d8fd87c3cb86e 
github.com/kubernetes/utils"
+"k8s.io/api fd83cbc87e7632ccd8bbab63d2b673d4e0c631cc github.com/kubernetes/api"
+"k8s.io/apiextensions-apiserver 05e89e265cc594459a3d33a63e779d94e6614c63 
github.com/kubernetes/apiextensions-apiserver"
+"k8s.io/apimachinery 6dd46049f39503a1fc8d65de4bd566829e95faff 
github.com/kubernetes/apimachinery"
+"k8s.io/apiserver e85ad7b666fef0476185731329f4cff1536efff8 
github.com/kubernetes/apiserver"
+"k8s.io/client-go 1638f8970cefaa404ff3a62950f88b08292b2696 
github.com/kubernetes/client-go"
+"k8s.io/cli-runtime 79bf4e0b64544d8c490247abae089bea572ddae6 
github.com/kubernetes/cli-runtime"
+"k8s.io/kube-openapi 0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803 
github.com/kubernetes/kube-openapi"
+"k8s.io/kubernetes 54a352dda957bce0f88e49b65a6ee8bba8c0ba74 
github.com/kubernetes/kubernetes"
+"k8s.io/utils 66066c83e385e385ccc3c964b44fd7dcd413d0ed 
github.com/kubernetes/utils"
 "vbom.ml/util db5cfe13f5cc80a4990d98e2e1b0707a4d1a5394 
github.com/fvbommel/util"
 )
 
 inherit golang-build golang-vcs-snapshot bash-completion-r1
 
-GIT_COMMIT="2e55dbe1fdb5fdb96b75ff144a339489417b146b"
+GIT_COMMIT="d325d2a9c179b33af1a024cdb5a4472b6288016a"
 
 ARCHIVE_URI="https://github.com/kubernetes/helm/archive/v${MY_PV}.tar.gz -> 
${P}.tar.gz
        ${EGO_VENDOR_URI}"
@@ -120,6 +121,9 @@ RESTRICT="test"
 
 src_prepare() {
        default
+       pushd src/${EGO_PN} || die
+       eapply "${FILESDIR}"/${P}-sorting.patch
+       popd
        sed -i -e "s/git rev-parse HEAD/echo ${GIT_COMMIT}/"\
                -e "s/git rev-parse --short HEAD/echo ${GIT_COMMIT:0:7}/"\
                -e "s#git describe --tags --abbrev=0 --exact-match 
2>/dev/null#echo v${PV}#"\

Reply via email to