logoalt Hacker News

Apt-bundle: brew bundle for apt

36 pointsby sadeshmukhlast Sunday at 6:34 AM24 commentsview on HN

Comments

curt15today at 4:12 PM

Brew got one thing right that no Linux package manager seems to emulate: it doesn't require root for normal operations and even goes so far as to error out if running as root (https://docs.brew.sh/FAQ#why-does-homebrew-say-sudo-is-bad).

show 4 replies
pzmarzlytoday at 3:06 PM

Looking at internal/commands/install.go, it only installs new packages, but doesn't uninstall removed ones. That's the biggest benefit of Brew bundle gone.

BTW how much of it is vibe coded?

show 1 reply
WhyNotHugotoday at 5:33 PM

apk uses a similar approach by default, and I think it's a wonderful way for a package manager to operate.

Basically, /etc/apk/world keeps a list of explicitly installed packages.

When you manually install a package, it's added to this list, when you manually remove a package, it's removed from the list.

Installation and upgrading (and "fixing) merely ensures that those packages and their dependencies are installed, no more, no less. This also automatically cleans up stale, unused dependencies.

It's a lovely way to get deterministic results. You can just back-up that world file, or copy it to another machine and get the exact same installation.

show 1 reply
letmeinheretoday at 4:26 PM

aconfmgr[https://github.com/CyberShadow/aconfmgr] is a kinda similar project for pacman-based distributions.

The difference is that it strives to track all non-user files, (not just packages, and especially /etc), but you can adopt it partially.

exploderatetoday at 5:04 PM

So, this is better than `dpkg --get-selections/--set-selections`? Oh, because it's partial?

pamcaketoday at 1:44 PM

Big fan! Was like magic at first but now I have a big bunch of Aptfiles to deal with instead... Currently working on solving that with the next-generation tool apt-bundle-bunch, which has a simple declarative format to manage your apt-bundle projects in an Aptbundlefile. It's already great for agents and Im working with Claude on a curl|sh install for the v1.

show 1 reply
Arrowmastertoday at 5:12 PM

I hate the Aptfile format after looking at it.

The ppa directive hints that this is intended for Ubuntu because otherwise installing PPAs is a great way to break a non Ubuntu distro.

The deb directive uses the old and soon to be deprecated .list file extension. DEB822 format is the replacement.

The key directive adds the key as globally trusted for all repos instead of locking it to a specific repo as recommended by Debian. I think this is required under the new DEB822 repo format.

jraphtoday at 4:45 PM

This appears to be a Show HN.

jbverschoortoday at 4:20 PM

Put in my mise.toml :)

lifetimerubyisttoday at 1:44 PM

man the things people come up with to avoid writing bash scripts

show 3 replies