distr1 / distri

a Linux distribution to research fast package management
https://distr1.org
Other
532 stars 28 forks source link

Architecture detection with runtime.GOARCH #81

Closed palfrey closed 3 years ago

palfrey commented 4 years ago

This PR replaces most of the instances of hardcoded "amd64" with runtime.GOARCH, so at least native builds work better on non-amd64 systems.

stapelberg commented 4 years ago

Replacing hard-coded amd64 with runtime.GOARCH is certainly an improvement, but can you leave the TODOs in place please? This needs to be configurable, so the TODOs are still relevant.

Thanks,

palfrey commented 4 years ago

Replacing hard-coded amd64 with runtime.GOARCH is certainly an improvement, but can you leave the TODOs in place please? This needs to be configurable, so the TODOs are still relevant.

All the places where runtime.GOARCH was being just used without any checks, I've replaced/added TODOs. I've removed it in cases where a cross variable was being checked first. Does that make sense?

stapelberg commented 3 years ago

Thanks!