{"action":"created","issue":{"url":"https://api.github.com/repos/Masterminds/glide/issues/871","repository_url":"https://api.github.com/repos/Masterminds/glide","labels_url":"https://api.github.com/repos/Masterminds/glide/issues/871/labels{/name}","comments_url":"https://api.github.com/repos/Masterminds/glide/issues/871/comments","events_url":"https://api.github.com/repos/Masterminds/glide/issues/871/events","html_url":"https://github.com/Masterminds/glide/issues/871","id":241902020,"number":871,"title":"how to ignore the vendor directory from dependency repos?","user":{"login":"chenchun","id":985861,"avatar_url":"https://avatars3.githubusercontent.com/u/985861?v=4","gravatar_id":"","url":"https://api.github.com/users/chenchun","html_url":"https://github.com/chenchun","followers_url":"https://api.github.com/users/chenchun/followers","following_url":"https://api.github.com/users/chenchun/following{/other_user}","gists_url":"https://api.github.com/users/chenchun/gists{/gist_id}","starred_url":"https://api.github.com/users/chenchun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chenchun/subscriptions","organizations_url":"https://api.github.com/users/chenchun/orgs","repos_url":"https://api.github.com/users/chenchun/repos","events_url":"https://api.github.com/users/chenchun/events{/privacy}","received_events_url":"https://api.github.com/users/chenchun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-07-11T01:58:17Z","updated_at":"2017-08-15T22:49:49Z","closed_at":null,"body":"My main repo depens on k8s repo, both my repo and k8s depens on glog. If I don't delete the vendor directory in k8s repo, eg. `vendor/k8s.io/kubernetes/vendor/`, my program will run into the following error:\r\n\r\n```\r\n./galaxy flag redefined: log_dir\r\npanic: ./galaxy flag redefined: log_dir\r\n\r\ngoroutine 1 [running]:\r\npanic(0x85c140, 0xc82024a470)\r\n\t/usr/local/go/src/runtime/panic.go:481 +0x3e6\r\nflag.(*FlagSet).Var(0xc820058060, 0x7fa71593c1e8, 0xc82024a420, 0x9f2920, 0x7, 0xa90440, 0x2f)\r\n\t/usr/local/go/src/flag/flag.go:776 +0x454\r\nflag.(*FlagSet).StringVar(0xc820058060, 0xc82024a420, 0x9f2920, 0x7, 0x0, 0x0, 0xa90440, 0x2f)\r\n\t/usr/local/go/src/flag/flag.go:679 +0xc7\r\nflag.(*FlagSet).String(0xc820058060, 0x9f2920, 0x7, 0x0, 0x0, 0xa90440, 0x2f, 0xc82024a410)\r\n\t/usr/local/go/src/flag/flag.go:692 +0x83\r\nflag.String(0x9f2920, 0x7, 0x0, 0x0, 0xa90440, 0x2f, 0x7eca7a)\r\n\t/usr/local/go/src/flag/flag.go:699 +0x5f\r\ngit.code.oa.com/gaiastack/galaxy/vendor/k8s.io/kubernetes/vendor/github.com/golang/glog.init()\r\n\t/go/src/git.code.oa.com/gaiastack/galaxy/go/src/git.code.oa.com/gaiastack/galaxy/vendor/k8s.io/kubernetes/vendor/github.com/golang/glog/glog_file.go:41 +0x13e\r\ngit.code.oa.com/gaiastack/galaxy/vendor/k8s.io/kubernetes/pkg/util/iptables.init()\r\n\t/go/src/git.code.oa.com/gaiastack/galaxy/go/src/git.code.oa.com/gaiastack/galaxy/vendor/k8s.io/kubernetes/pkg/util/iptables/save_restore.go:108 +0x5e\r\ngit.code.oa.com/gaiastack/galaxy/pkg/network/portmapping.init()\r\n\t/go/src/git.code.oa.com/gaiastack/galaxy/go/src/git.code.oa.com/gaiastack/galaxy/pkg/network/portmapping/iptables.go:269 +0x63\r\ngit.code.oa.com/gaiastack/galaxy/pkg/galaxy.init()\r\n\t/go/src/git.code.oa.com/gaiastack/galaxy/go/src/git.code.oa.com/gaiastack/galaxy/pkg/galaxy/server.go:161 +0x9c\r\nmain.init()\r\n\t/go/src/git.code.oa.com/gaiastack/galaxy/go/src/git.code.oa.com/gaiastack/galaxy/cmd/galaxy/galaxy.go:27 +0x45\r\n```\r\n\r\nHere is the output of compiling. glog linked twice from `git.code.oa.com/gaiastack/galaxy/vendor/github.com/golang/glog` and `git.code.oa.com/gaiastack/galaxy/vendor/k8s.io/kubernetes/vendor/github.com/golang/glog`\r\n\r\n```\r\nBuilding galaxy\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/containernetworking/cni/pkg/types\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/containernetworking/cni/pkg/version\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/containernetworking/cni/pkg/invoke\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/containernetworking/cni/pkg/skel\r\ngit.code.oa.com/gaiastack/galaxy/pkg/network/flannel\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/golang/glog\r\ngit.code.oa.com/gaiastack/galaxy/pkg/api/cniutil\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/docker/distribution/digest\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/docker/distribution/reference\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/Sirupsen/logrus\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/opencontainers/runc/libcontainer/user\r\ngit.code.oa.com/gaiastack/galaxy/vendor/golang.org/x/net/proxy\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/docker/go-connections/sockets\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/docker/engine-api/client/transport\r\ngit.code.oa.com/gaiastack/galaxy/vendor/golang.org/x/net/context\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/docker/engine-api/client/transport/cancellable\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/docker/engine-api/types/blkiodev\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/docker/engine-api/types/strslice\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/docker/go-connections/nat\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/docker/go-units\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/docker/engine-api/types/container\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/docker/engine-api/types/versions\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/docker/engine-api/types/filters\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/docker/engine-api/types/network\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/docker/engine-api/types/registry\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/docker/engine-api/types\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/docker/engine-api/types/reference\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/docker/engine-api/types/time\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/docker/go-connections/tlsconfig\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/docker/engine-api/client\r\ngit.code.oa.com/gaiastack/galaxy/pkg/api/docker\r\ngit.code.oa.com/gaiastack/galaxy/pkg/api/k8s\r\ngit.code.oa.com/gaiastack/galaxy/pkg/api/galaxy\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/vishvananda/netns\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/vishvananda/netlink/nl\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/vishvananda/netlink\r\ngit.code.oa.com/gaiastack/galaxy/pkg/flags\r\ngit.code.oa.com/gaiastack/galaxy/pkg/wait\r\ngit.code.oa.com/gaiastack/galaxy/pkg/gc\r\ngit.code.oa.com/gaiastack/galaxy/pkg/network/kernel\r\ngit.code.oa.com/gaiastack/galaxy/vendor/k8s.io/kubernetes/vendor/github.com/godbus/dbus\r\ngit.code.oa.com/gaiastack/galaxy/vendor/k8s.io/kubernetes/pkg/util/dbus\r\ngit.code.oa.com/gaiastack/galaxy/vendor/k8s.io/kubernetes/pkg/util/exec\r\ngit.code.oa.com/gaiastack/galaxy/vendor/k8s.io/kubernetes/vendor/github.com/coreos/go-semver/semver\r\ngit.code.oa.com/gaiastack/galaxy/vendor/k8s.io/kubernetes/vendor/github.com/golang/glog\r\ngit.code.oa.com/gaiastack/galaxy/vendor/k8s.io/kubernetes/pkg/util/sets\r\ngit.code.oa.com/gaiastack/galaxy/vendor/k8s.io/kubernetes/pkg/util/iptables\r\ngit.code.oa.com/gaiastack/galaxy/pkg/network/portmapping\r\ngit.code.oa.com/gaiastack/galaxy/pkg/api/apiswitch\r\ngit.code.oa.com/gaiastack/galaxy/pkg/utils/httputils\r\ngit.code.oa.com/gaiastack/galaxy/pkg/network/remote\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/emicklei/go-restful/log\r\ngit.code.oa.com/gaiastack/galaxy/vendor/github.com/emicklei/go-restful\r\ngit.code.oa.com/gaiastack/galaxy/pkg/galaxy\r\ngit.code.oa.com/gaiastack/galaxy/pkg/signal\r\ngit.code.oa.com/gaiastack/galaxy/cmd/galaxy\r\n```\r\n\r\nI tried to use `ignore`, but the package still gets vendored in.\r\n\r\n```\r\npackage: git.code.oa.com/gaiastack/galaxy\r\nignore:\r\n- github.com/containernetworking/cni/vendor\r\n- k8s.io/kubernetes/vendor\r\nimport:\r\n- package: github.com/containernetworking/cni\r\n  version: 0e09ad29df1eda8c0e15f8b6c4c7784a42e125bf\r\n  subpackages:\r\n  - pkg/invoke\r\n  - pkg/ip\r\n  - pkg/ipam\r\n  - pkg/ns\r\n  - pkg/skel\r\n  - pkg/types\r\n  - pkg/version\r\n- package: github.com/docker/engine-api\r\n  version: dea108d3aa0c67d7162a3fd8aa65f38a430019fd\r\n  subpackages:\r\n  - client\r\n  - types\r\n- package: github.com/emicklei/go-restful\r\n  version: 89ef8af493ab468a45a42bb0d89a06fccdd2fb22\r\n  subpackages:\r\n  - log\r\n  - swagger\r\n- package: github.com/golang/glog\r\n- package: github.com/vishvananda/netlink\r\n  subpackages:\r\n  - nl\r\n- package: github.com/vishvananda/netns\r\n- package: golang.org/x/net/context\r\n- package: k8s.io/client-go\r\n  repo: http://github.com/kubernetes/client-go.git\r\n  version: v1.4.0\r\n  subpackages:\r\n  - 1.4/kubernetes\r\n  - 1.4/pkg/api\r\n  - 1.4/pkg/api/v1\r\n  - 1.4/pkg/util/wait\r\n  - 1.4/tools/cache\r\n- package: k8s.io/kubernetes\r\n  version: v1.4.12\r\n  repo: http://github.com/kubernetes/kubernetes.git\r\n  subpackages:\r\n  - pkg/util/dbus\r\n  - pkg/util/exec\r\n  - pkg/util/iptables\r\n```"},"comment":{"url":"https://api.github.com/repos/Masterminds/glide/issues/comments/322610625","html_url":"https://github.com/Masterminds/glide/issues/871#issuecomment-322610625","issue_url":"https://api.github.com/repos/Masterminds/glide/issues/871","id":322610625,"user":{"login":"dchinmaya","id":5401472,"avatar_url":"https://avatars2.githubusercontent.com/u/5401472?v=4","gravatar_id":"","url":"https://api.github.com/users/dchinmaya","html_url":"https://github.com/dchinmaya","followers_url":"https://api.github.com/users/dchinmaya/followers","following_url":"https://api.github.com/users/dchinmaya/following{/other_user}","gists_url":"https://api.github.com/users/dchinmaya/gists{/gist_id}","starred_url":"https://api.github.com/users/dchinmaya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dchinmaya/subscriptions","organizations_url":"https://api.github.com/users/dchinmaya/orgs","repos_url":"https://api.github.com/users/dchinmaya/repos","events_url":"https://api.github.com/users/dchinmaya/events{/privacy}","received_events_url":"https://api.github.com/users/dchinmaya/received_events","type":"User","site_admin":false},"created_at":"2017-08-15T22:49:49Z","updated_at":"2017-08-15T22:49:49Z","body":"I have the same issue. How did u resolve this? @chenchun "}}
{"actor":{"display_login":"dchinmaya"}}