Updating Hugo: Dependencies #
I’ve mentioned before about using brew update/upgrade
to update Hugo, and breaking themes. I kinda thought this was a one-time problem, because I had to switch to Blowfish. I guess for some silly reason I thought “oh, I’ll move to a supported theme, and never have to worry about that again!”.
Wrong.
Today I somewhat blindly decided to update Hugo. I don’t know why, it’s not like it was broken or there was some new wonderful feature I wanted/needed. I just try and keep stuff up to date. You know. Because everyone is always yelling at you to keep up to date on your software, or the boogeyman will eat you! I kinda forgot that a static site generator more likely than not will not be compromised by an exploit. I mean, sure, maybe it’ll generate code that is exploitable, but. . . unlikely?
So the sequence of events:
- Upgrade brew
- Update everything
- Build Site
- Marvel at the errors from trying to build the site
- Realize one of the errors is saying that Blowfish doesn’t support this version of Hugo.
Uh, what? I mean, there were a bunch of other errors and warnings, but. . . what?
OK, clearly, the problem here is not having updated Blowfish. So, update blowfish.
Fun fact: Blowfish’s HEAD says it works with Hugo 0.135.0. OK.
All I need to do is install Hugo 0.135.0.
Brew doesn’t have any such notion of versions for Hugo. WAT?
I find a page that talks about installed a specific version of Hugo. You have got to be shitting me.
So, I do as instructed. Oh, wait. I have to install homebrew/core
. Turns out Starbucks’ internet ain’t that great. So I kill that and just download the specific version of the Hugo formula for 0.135.0. Only, I get errors. I guess putting the 0.135.0 version into the formula actually downloads the 0.134.3 version. WTF?
I’ll spare the details, but basically I think something as wrong with the 0.135.0 version of hugo.rb, and it downloaded the 0.134.3 version instead. Anyway, much dicking around, and I have 0.134.3 installed
My point here is this:
I can’t update to the latest version of Hugo because the latest version of Blowfish doesn’t support it. So I have to do some gymnastics to download the latest version of Hugo that Blowfish supports.
I would pin the version of Hugo that Blowfish supports, but a) I had to create my own “tap” of Hugo to get the specific version I needed, and b) I have no idea how to deal with this once Blowfish supports a more current version of Hugo (i.e., by the time Blowfish supports 0.136.0, Hugo will be at 1.138.12 or some such).
Ain’t open source software great?
Oh, and after I got the right Hugo version, I still had to go address three or four random warnings/errors1.
-
Mostly changes to params. I.e. Site.params.author.name and pagination and other “normal” stuff that changes, although I was surprised to have to add
git
to the list of things to be able to exec. ↩︎