[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Correct import path of golang-github-oklog-ulid and some other packages



On 11/20/21 9:17 AM, Shengjing Zhu wrote:

In debian/control file of "golang-github-oklog-ulid" package,
"XS-Go-Import-Path"[1] field has "github.com/oklog/ulid" as its value.
Shouldn't it be "github.com/oklog/ulid/v2"? Upstream[2] along with
packages[3] which require ulid package as its dependency, uses
"github.com/oklog/ulid/v2" as its import path.

Since we don't use Go module, this doesn't matter too much.

Okay, but how does dh-make-golang able to correctly filter our already packed packages, if we've incorrect XS-Go-Import-Path? From a quick glance, I can see that dh-make-golang uses FTP-Master's API[1] to create a map/dictionary[2] of "XS-Go-Import-Path" and "binary name" of the already packed packages and then use this map to filter out packages[3].

[1]: https://github.com/Debian/dh-make-golang/blob/master/search.go#L15
[2]: https://github.com/Debian/dh-make-golang/blob/master/search.go#L42
[3]: https://github.com/Debian/dh-make-golang/blob/master/estimate.go#L104

And other people could also rely on these APIs[4][5] to get packaging status of Go packages, where XS-Go-Import-Path field plays crucial role.

[4]: https://api.ftp-master.debian.org/source/by_metadata/Go-Import-Path
[5]: https://api.ftp-master.debian.org/binary/by_metadata/Go-Import-Path

    - json2file-go (https://salsa.debian.org/sto/json2file-go)
        Import path contains protocol information (i.e. https://).


This is wrong.

To fix this, do I need package maintainer's permission, beforehand?


- v


Reply to: