gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
75.38k stars 7.49k forks source link

debs for hugo extended should use a different package name and conflict #12678

Open t0xicCode opened 2 months ago

t0xicCode commented 2 months ago

It would be nice if the hugo_extended deb files declared their package name as hugo-extended. The Provides,Conflicts,Replaces relationship would allow it to satisfy and automatically replace the hugo package, while making it clear to the user that the extended version was installed.

nFPM already supports those fields, so they might just need to be added to the hugoreleaser archive plugin.

bep commented 2 months ago

I don't know enough about Deb to tell, but I will take your word that what you propose is a good thing. I assume that after this change, running hugo after installing hugo-extended (and only that Hugo deb) would still point to the correct binary?

As to the nFPM fields, they needs to be added/mapped in the struct here:

https://github.com/gohugoio/hugoreleaser-archive-plugins/blob/3de4b033bb3a80bce9540ea4ba1e89de7cb0a946/deb/main.go#L110

I can certainly do that, but I need some help determining what the values should be here in this project.