Hacker News new | ask | show | jobs
by ornornor 1905 days ago
Doesn’t apt (for instance) work the same way? Or docker images without a tag? I’d you don’t specify a version in each case then you get the latest available. I’d you want a specific version pinned then you should specify it. I think I don’t see your point, works as intended. If you enforced mandatory version specification every time, you’d have to know exactly which version is which package for anything you install: apt install Firefox > nope won’t work, instead you have to know what is today’s latest Firefox version (changes every couple of days/weeks)
3 comments

It's not really how apt works but rather how Debian works: you use apt with a specific release repository of Debian (stretch, buster or whatever ISO you installed).

Debian is really strict about its releases and won't push a breaking change in a specific version of the OS.

For instance, `apt install htop` will only ever install the 2.X version of htop in Buster. Including security patches and all, but you won't get a 3.0.0 version without going sideways and add a specific repository for that. Debian will ship with htop version 3 in the next release, but you'll have to upgrade the entire distro for that.

Brew is different in that it allows anybody to merge a new breaking version of the software you use, so `brew install htop` on Monday could give you the 2.x version, and on Tuesday will install the 3.0.0 version.

You could maybe compare it to the rolling releases of Arch. But Arch has a better way of handling it than Brew: they test, they prepare, they communicate for bug changes..

Brew would benefit from segmenting their offering, but you'd lose the bleeding-edginess of it. Really, if you want reproducible packaging on Mac, I'd use nix or docker. If you want convenience and edge, use brew and deal with it.

> For instance, `apt install htop` will only ever install the 2.X version of htop in Buster. Including security patches and all, but you won't get a 3.0.0 version without going sideways and add a specific repository for that. Debian will ship with htop version 3 in the next release, but you'll have to upgrade the entire distro for that.

Debian has an official backports repository if you want that behavior. It just gives you the freedom to choose.

On most debian-based distros, most packages aren't upgraded to a new major version in the repos for a particular version of the OS. If a new version of postgres is released, it won't be added to the apt repos for the current stable debian, ubuntu, etc. distributions. Instead it will be included in the repo for the next major release of the distro.

There are exceptions to that, for example browsers like Firefox and Chromium, but upgrading the major version of Firefox is much less risky than upgrading the major version of postgresql.

Rolling release distros like Debian Sid (and archlinux, though that doesn't use apt) don't work this way, which is why rolling release distros have a reputation for being less stable.

That’s really interesting, does anyone have a book or blog post taking about this versioning and releasing strategy?

I feel like as a new dev there’s so much in engineering I could learn from that’s already been solved and re-solved again and again or at least addressed by existing distribution systems.

However the reading materials to learn about some of this stuff seems far and few or very niche, sitting on some cached blog post from the 90s..

apt generally doesn't switch you to a new incompatible version of a package unless you upgrade your whole install. Browsers are not libraries and have special status due to their importance and having security and feature updates not separated.