Opened 3 years ago

Last modified 3 years ago

#62591 new defect

port lint incorrectly warns about missing checksums in go.vendors and cargo.crates

Reported by: gpanders (Gregory Anders) Owned by:
Priority: Normal Milestone:
Component: base Version:
Keywords: Cc: kurthindenburg (Kurt Hindenburg)
Port:

Description (last modified by kurthindenburg (Kurt Hindenburg))

Consider the cloudflared Portfile (I just picked this one at random, but the result is the same for any port using go.vendors). If you run 'port lint' on this port, you get the following:

--->  Verifying Portfile for cloudflared
Warning: capnproto-go-capnproto2-v2.18.0.tar.gz - missing recommended checksum type: sha256
Warning: capnproto-go-capnproto2-v2.18.0.tar.gz - missing recommended checksum type: size

Even though the go.vendors field in the Portfile does in fact contain all of the recommended checksum types for each entry.

Change History (2)

comment:1 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

port lint is not very smart. It just reads a portfile line by line and tries to inform of common pitfalls. It does not know Tcl. The way that it looks for checksums is to analyze the checksums line only. Ports using go.vendors define their checksums not in the checksums line but in the go.vendors line, hence port lint does not know about them.

comment:2 Changed 3 years ago by kurthindenburg (Kurt Hindenburg)

Cc: kurthindenburg added
Description: modified (diff)
Summary: port lint incorrectly warns about missing checksums in go.vendorsport lint incorrectly warns about missing checksums in go.vendors and cargo.crates

For reference from https://github.com/macports/macports-ports/pull/10573

This is a known issue for Go ports which use go.vendors and Rust ports which use cargo.crates.

go.vendors and cargo.crates are mechanisms implemented within the Go and cargo portgroups that aren't native MacPorts keywords - they in turn make modifications to distnames, checksums, etc., but I guess not in a way that satisfies port lint.

Note: See TracTickets for help on using tickets.