Hacker News new | ask | show | jobs
by Spivak 414 days ago
> Ubuntu continuously updates itself without permission, killing apps and losing previous state.

What? Is this some snap thing because apt sure as hell doesn't do this without you configuring it explicitly.

2 comments

Not sure what OP was referring to, but snaps are indeed a ridiculous problem.

There's no control of when snaps update, Ubuntu has explicitly said they will never add this.

There was no way to disable snap auto-updates until just last year(-ish?) when Firefox finally announced they would no longer support snaps and started telling people how to tear them out and replace them with native packages or Flatpaks. Low-and-behold, Ubuntu suddenly got the feature to disable automatic snap updates. After saying explicitly they would never allow it for years, and telling high-uptime users to instead block snap daemon network access via the firewall to avoid it.

apt won't on its own, but if you're using the official images there's probably a service running that's calling it, probably for security patches etc.

The bigger problem is upgrading packages deliberately but being surprised by the results. My team's current favorite is the upgrade process itself suddenly having new interactive prompts breaking our scripts.

> My team's current favorite is the upgrade process itself suddenly having new interactive prompts breaking our scripts.

This is how dpkg and apt have worked in Debian and Ubuntu pretty much since their inception. Look into debconf, dpkg and ucf configuration to learn how to integrate these with your automation. The mechanisms for this have existed for decades now and have not substantially changed in that time.

dpkg grew knowledge of Source lists suddenly?

If you're installing software from Debian/Ubuntu repos, you can only use aptitude or apt to my knowledge. Other tools give you the ability to install DEB files you already have, and manage what's on your system currently. And aptitude and apt are both well known for never having had a "stable" scriptable interface. In fact they themselves tell you that their commands are not stable and should not be used for scripting, despite no alternative mode or application existing.

Recently Ubuntu moved to apt 3 as well, which massively overhauled the tool from apt 2. All those scripts people wrote to use apt 2 (because there was no alternative) broke recently when they now had to use apt 3.

Your understanding is just outright wrong. The `apt` command has an unstable interface so that it can improve the CLI without worrying about breaking scripts. The `apt-get` command is the stable interface for scripts. `apt` was created after `apt-get` became ossified exactly because the developers work hard to keep the interface for scripts stable.

> In fact they themselves tell you that their commands are not stable and should not be used for scripting, despite no alternative mode or application existing.

No, that's just the apt command, not the apt-get command, and the manpage for apt tells you exactly how to do this instead. It's clearly documented, so your "despite no alternative mode or application existing" claim is simply ignorant.

Please read the documentation and learn how to use the tooling before criticizing it and misleading others with claims that are outright wrong.

I thought DEBIAN_FRONTEND=noninteractive was supposed to avoid that?
That and a couple of -o's, like conf old (not sure, on my phone)