buckaroogeek reported a new issue against the project: `go-rpm-macros` that you are
following:
``
Processing vendor/modules.txt file for kubernetes will fail. Error (using modified code to
show problem) is similar to:
```
# gopkg.in/yaml.v2 v2.4.0
# gopkg.in/yaml.v3 v3.0.1
# k8s.io/api v0.0.0 => ./staging/src/k8s.io/api
Traceback (most recent call last):
File "/home/bgsmith/tmp/go/vendor2provides.py", line 55, in <module>
exit(main())
^^^^^^
File "/home/bgsmith/tmp/go/vendor2provides.py", line 38, in main
ipath, version = replace_regex.sub("", dep[2:]).split(" ")[:2]
^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 1)
```
The modules.txt file can be found at:
https://github.com/kubernetes/kubernetes/blob/master/vendor/modules.txt.
In
https://github.com/kubernetes/kubernetes/blob/master/staging/README.md the kubernetes
team writes: "Kubernetes code uses the repositories in this directory via a Go
workspace and module replace statements. For example, when Kubernetes code imports a
package from the k8s.io/client-go repository, that import is resolved to
staging/src/k8s.io/client-go relative to the project root:"
It appears that using Replace directive in go.mod and/or go.work results in the lines like
```# k8s.io/api v0.0.0 => ./staging/src/k8s.io/api``` which are not (yet) handled by
the script. I do not know if these lines should be parsed or just skipped? If parsing is
needed, then how to get the correct version?
``
To reply, visit the link below or just reply to this email
https://pagure.io/go-rpm-macros/issue/64