VOL-2138 Fix LOCAL_LIB_GO for v2 paths
Change-Id: I057d25cd3c9c044ed3c6e0faefa56039f8df7989
diff --git a/BUILD.md b/BUILD.md
index 468ba13..4be6b74 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -52,8 +52,6 @@
dep ensure
```
-
-
### Building and Running VOLTHA Core locally
@@ -99,6 +97,23 @@
DOCKER_HOST_IP=<Host IP> docker-compose -f compose/rw_core.yml up -d
```
+### Building with a Local Copy of `voltha-protos` or `voltha-lib-go`
+
+If you want to build/test using a local copy or `voltha-protos` or `voltha-lib-go`
+this can be accomplished by using the environment variables `LOCAL_PROTOS` and
+`LOCAL_LIB_GO`. These environment variables should be set to the filesystem
+path where the local source is located, e.g.
+
+```bash
+LOCAL\_PROTOS=$HOME/src/voltha-protos
+LOCAL\_LIB\_GO=$HOME/src/voltha-lib-go
+```
+
+When these environment variables are set the vendored versions of these packages
+will be removed from the `vendor` directory and replaced by coping the files from
+the specificed locattions to the `vendor` directory. *NOTE:* _this means that
+the files in the `vendor` directory are no longer what is in the `git` repository
+and it will take manual `git` intervention to put the original files back._
### Building and running Ponsim OLT and ONU Adapters
diff --git a/Makefile b/Makefile
index e719891..d21c2f3 100644
--- a/Makefile
+++ b/Makefile
@@ -99,8 +99,8 @@
## Local Development Helpers
local-lib-go:
ifdef LOCAL_LIB_GO
- mkdir -p vendor/github.com/opencord/voltha-lib-go/pkg
- cp -r ${LOCAL_LIB_GO}/pkg/* vendor/github.com/opencord/voltha-lib-go/pkg/
+ mkdir -p vendor/github.com/opencord/voltha-lib-go/v2/pkg
+ cp -r ${LOCAL_LIB_GO}/pkg/* vendor/github.com/opencord/voltha-lib-go/v2/pkg/
endif
local-pyvoltha:
@@ -108,7 +108,7 @@
ifdef LOCAL_PYVOLTHA
rm -rf python/local_imports/pyvoltha
mkdir -p python/local_imports/pyvoltha/dist
- cp ../pyvoltha/dist/*.tar.gz python/local_imports/pyvoltha/dist/
+ cp ${LOCAL_PYVOLTHA}/dist/*.tar.gz python/local_imports/pyvoltha/dist/
endif
## Python venv dev environment