Masterminds / glide

Package Management for Golang
https://glide.sh
Other
8.15k stars 541 forks source link

mirror not working for sub-package directory #1036

Open paulcarlton opened 5 years ago

paulcarlton commented 5 years ago

I am trying to build a project that references sub packages in the same project. I'm using mirror to map the repo to my local copy of the project. The local copy of the project seems to get copied to the cache directory as is except the directory my sub-package is in!

My glide file contains

pcarlton@ncs-sec:~/src/github.hpe.com/platform-opshq/secrets-lcm/seclcm$ cat glide.yaml

(c) Copyright 2018 Hewlett Packard Enterprise Development LP

package: github.hpe.com/platform-opshq/secrets-lcm/seclcm import:

Glide mirror setting

cat mirrors.yaml repos:

Go/Glide path

env | grep 'GO|GLIDE' GOBIN=/home/pcarlton/bin GOROOT=/usr/local/go GOPATH=/home/pcarlton GLIDE_HOME=/home/pcarlton/src/github.hpe.com/platform-opshq/secrets-lcm/seclcm

When I run glide install I get

[ERROR] Error scanning github.hpe.com/platform-opshq/secrets-lcm/api/models: cannot find package "." in: /home/pcarlton/src/github.hpe.com/platform-opshq/secrets-lcm/seclcm/cache/src/file--home-pcarlton-src-github.hpe.com-platform-opshq-secrets-lcm/api/models [ERROR] Error scanning github.hpe.com/platform-opshq/secrets-lcm/api/restapi/operations: cannot find package "." in: /home/pcarlton/src/github.hpe.com/platform-opshq/secrets-lcm/seclcm/cache/src/file--home-pcarlton-src-github.hpe.com-platform-opshq-secrets-lcm/api/restapi/operations

And if I check sure enough the cache directory has

ls -lR /home/pcarlton/src/github.hpe.com/platform-opshq/secrets-lcm/seclcm/cache/src/file--home-pcarlton-src-github.hpe.com-platform-opshq-secrets-lcm/api /home/pcarlton/src/github.hpe.com/platform-opshq/secrets-lcm/seclcm/cache/src/file--home-pcarlton-src-github.hpe.com-platform-opshq-secrets-lcm/api: total 4 drwxrwxr-x 2 pcarlton pcarlton 4096 Nov 13 13:35 restapi

/home/pcarlton/src/github.hpe.com/platform-opshq/secrets-lcm/seclcm/cache/src/file--home-pcarlton-src-github.hpe.com-platform-opshq-secrets-lcm/api/restapi: total 12 -rw-rw-r-- 1 pcarlton pcarlton 5666 Nov 13 13:35 api-mgr.go -rw-rw-r-- 1 pcarlton pcarlton 4072 Nov 13 13:35 configure_seclcm.go

Yet my local copy of the repo has

ls -l /home/pcarlton/src/github.hpe.com/platform-opshq/secrets-lcm/api total 12 drwxr-xr-x 3 pcarlton pcarlton 4096 Nov 5 21:48 client drwxr-xr-x 2 pcarlton pcarlton 4096 Nov 5 21:48 models drwxr-xr-x 3 pcarlton pcarlton 4096 Nov 13 10:04 restapi

The cache api directory seems to have some of the files from the local copy of the repo but not all of them?