summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2023-10-05 20:21:49 +0000
committerBruce Ashfield <bruce.ashfield@gmail.com>2023-11-06 16:21:12 +0000
commit77d31a83ed212d95fc98ce190da0a632a50c4676 (patch)
tree6bcddd689ad0c9095abb0aa7f2d5d404aa68cc50
parent4c8860080355dddaec2af7eec46e1c059c718851 (diff)
downloadmeta-virtualization-77d31a83ed212d95fc98ce190da0a632a50c4676.tar.gz
oe-go-mod-autogen: add extra information to duplicate module paths
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--scripts/README-oe-go-mod-autogen.txt33
-rwxr-xr-xscripts/oe-go-mod-autogen.py2
2 files changed, 34 insertions, 1 deletions
diff --git a/scripts/README-oe-go-mod-autogen.txt b/scripts/README-oe-go-mod-autogen.txt
index e5c11d90..36f1d89e 100644
--- a/scripts/README-oe-go-mod-autogen.txt
+++ b/scripts/README-oe-go-mod-autogen.txt
@@ -79,3 +79,36 @@ Description:
79 to manually handle these unhandled modules if they are urgent to 79 to manually handle these unhandled modules if they are urgent to
80 add/upgrade some go mod recipes. 80 add/upgrade some go mod recipes.
81 81
82
83Debug tips:
84
85If the do_compile task exits with a go mod / fetch error, this is due
86to some sort of compilation error during the go build. The log file
87can be huge. To figure out what broke, try the following:
88
89 % cd ${S}/src/import
90 % grep -v ^HASH ../../../temp/log.do_compile
91
92This will likely highlight what broke. It is often that either the wrong
93revision was used (and there will be go build errors) or that a fetched
94repository used the wrong source or destination. Seeing what module
95couldn't be found, will allow you to locate the SRC_URI fetch in question,
96how it was relocated. Either the source or destination may be wrong.
97
98As an example, k3s was failing with the following error:
99
100 go: finding module for package sigs.k8s.io/kustomize/kustomize/v5/commands/build
101 vendor/k8s.io/kubectl/pkg/cmd/kustomize/kustomize.go:25:2: cannot query module due to -mod=vendor
102 WARNING: exit code 1 from a shell command.
103
104Which leads to looking at the SRC_URI and vendor fetch, which was not
105using the proper source for kustomize.
106
107 sigs.k8s.io/kustomize/kustomize/v5:sigs.k8s.io/kustomize/kustomize:force \
108
109had to be changed to:
110
111 sigs.k8s.io/kustomize/kustomize/v5:sigs.k8s.io/kustomize/kustomize/v5/kustomize:force \
112
113To get the commands/build subirectory from the source into the proper
114vendor location.
diff --git a/scripts/oe-go-mod-autogen.py b/scripts/oe-go-mod-autogen.py
index 2970847e..c44c096a 100755
--- a/scripts/oe-go-mod-autogen.py
+++ b/scripts/oe-go-mod-autogen.py
@@ -627,7 +627,7 @@ do_compile:prepend() {
627 if module_to_check == m: 627 if module_to_check == m:
628 continue 628 continue
629 if not m.startswith('%s/' % module_to_check): 629 if not m.startswith('%s/' % module_to_check):
630 logger.warning("%s is sharing repo (%s) with other modules, and it might need a subpath. Please double check" % (module_to_check, repo)) 630 logger.warning("%s is sharing repo (%s) with other modules, and it might need a subpath. Please double check: %s and: %s" % (module_to_check, repo, nosubpath_modules,m))
631 continue 631 continue
632 632
633 # 633 #