diff options
Diffstat (limited to 'scripts/README-oe-go-mod-autogen.txt')
-rw-r--r-- | scripts/README-oe-go-mod-autogen.txt | 33 |
1 files changed, 33 insertions, 0 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 | |||
83 | Debug tips: | ||
84 | |||
85 | If the do_compile task exits with a go mod / fetch error, this is due | ||
86 | to some sort of compilation error during the go build. The log file | ||
87 | can 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 | |||
92 | This will likely highlight what broke. It is often that either the wrong | ||
93 | revision was used (and there will be go build errors) or that a fetched | ||
94 | repository used the wrong source or destination. Seeing what module | ||
95 | couldn't be found, will allow you to locate the SRC_URI fetch in question, | ||
96 | how it was relocated. Either the source or destination may be wrong. | ||
97 | |||
98 | As 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 | |||
104 | Which leads to looking at the SRC_URI and vendor fetch, which was not | ||
105 | using the proper source for kustomize. | ||
106 | |||
107 | sigs.k8s.io/kustomize/kustomize/v5:sigs.k8s.io/kustomize/kustomize:force \ | ||
108 | |||
109 | had to be changed to: | ||
110 | |||
111 | sigs.k8s.io/kustomize/kustomize/v5:sigs.k8s.io/kustomize/kustomize/v5/kustomize:force \ | ||
112 | |||
113 | To get the commands/build subirectory from the source into the proper | ||
114 | vendor location. | ||