Sane Package Management

What's the sanest package manager and why? Which notable operating systems use it? How can package management software be improved?

Most package managers I've come across all share the same fundamental flaws; ultimately, each package is free to take a fat shit on the system during installation, ruining configs, cluttering the filesystem and running shitty scripts that assume too much; custom/local patches and software are universally a pain compared with how fun it is in TempleOS; compatibility and dependencies are still a nightmare, made most evident with Portage although still present in others. In general while Windows has registry problems, all GNU/Linux distributions I've used still age poorly unless aggressively administered or conservatively used.

To my knowledge, only Nix & Guix deal with the first and third problems, although the only mature Nix distro uses SystemDicks, and Guix is less mature.

Other urls found in this thread:

blog.rust-lang.org/2016/05/05/cargo-pillars.html
nest.pijul.com/pmeunier/nix-rust
wiki.gentoo.org/wiki/Perl#app-admin.2Fgentoo-perl-helpers
twitter.com/NSFWRedditImage

source.tar.gz

cargo
blog.rust-lang.org/2016/05/05/cargo-pillars.html

I don't have any problems with using the OpenBSD pkg stuff, although some things go overboard on dependencies (got a bunch of gnome shit installed, despite not using gnome). But at least it's easy to clean-up all unused dependencies, so it's just a minor problem.

xbps

We should eliminate language specific package managers completely. With Guix maturing, why do they need to continue exist?

apt-get

Does anyone use paludis? What's it like?

Well, I really like portage and apk. Arch's pacman is pretty good too.

Another one interested. Portage is quite slow due to python.

apk

Bait

Cargo is fucking great for development. I just wish it was more integrated with the system, for extra security (right now, cargo crates are vulnerable to userspace rootkits just by being left open in the user's home directory with no special permissions), less package redundancy and easier dynamic linking.

That said, I don't know how would it work for system wide packages. I'd rather use Guix, maybe in an ideal world where every software out there uses semver, or one where every package maintainer out there bothered to check which versions break the API.


Keeping them out of convenience is fine. Cargo simply wouldn't work if it relied on someone else's repos for two main reasons: only really major libraries (think mio/tokio, hyper, serde and not many more) people give a fuck about would get uploaded to the repo (and probably not in a timely manner), and it would defeat the point of reproducible builds, specially if your distro likes to patch packages on their own.

Cargo is also a simple ini file, so getting started is quite easy compared to the steep learning curve of autotools, and is easier to check for potential "surprises". It's also truly portable (unlike makefiles), doesn't require root permissions (although guix could help with that) for simply making a program, and basically shits on most other build script systems despite not being as cool and "hardcore" as makefiles. All it lacks is system integration.

I wonder why the fuck is Holla Forums against Cargo. Is it because it's "like npm", even though they are nothing alike? I could understand not liking Rust or its syntax, since it's fairly rough on some edges, but there is absolutely nothing wrong with Cargo.

Portage

Weird.
I've never had any serious problems with package managers.
Are you sure it wasn't you who did screw up your systems, OP?

If you are a system administrator, regular package managers can mess things up pretty badly for you. If you are a normal desktop user, things have worked out surprisingly pretty well.
Two thing regular package managers have sucked pretty hard at are transactional update and rollback, and reproducable builds. Nix and Guix are killing those problems dead as we speak.

Portage. It's a pleasure to use, not a mandatory task or a hassle.

I agree, it is simple and easy to use. It can be really slow though.
This is annoying. When i use mpv, a video player, some "dbus-daemon" and "dbus-launch" programs are started in the background. I have no idea what they do, mpv works if i kill them. They do not die when mpv exits, they run forever if i do not kill them.

I am not going to use a different package manager because the language of a package.
I do not want to care that a package is written in rust, and have to use a different method of installing it.

Rust has as far as i know a hard dependency on llvm, so the portable thing goes out of the window. And if you are going to make a meme language in CY-5 or CY+2, have it compile to C instead of what Rust does.

Paludis is pure suffering.

It's designed for scripting first and human users never: if you want something as simple as a "press Y to confirm" prompt the answer they give is always "write it yourself, wontfix".
The existing third party scripts that add things like --ask don't work because the API breaks constantly.
It takes up to half an hour to resolve dependencies for a world update when you have more than 2 or 3 repos. Its search indexer takes hours to update compared to seconds for eix. Even with an on-disk index (and I hope you like wrapper scripts for retarded long-ass command switches, because it doesn't load one unless you spell it out for it) it takes forever to find anything.

It doesn't know how to handle PMS-compliant packages (e.g. it chokes on s6 which tries to install a bunch of example files containing sockets), even though it's made by the same autist who writes the Gentoo Package Manager Spec.

No shitpost here, it's really that fucking bad. Don't use it.

O-Oh, okay. I was really hoping for something new after experiencing my first major Perl update and all the bullshit that goes with it.

And I do not want to login as root whenever I realize I missed a dependency. Cargo also handles git downloads and builds them for you, and that would be quite a pain in the ass to to install manually.

People don't complain about vim plugin managers and they are not so different.

Low tier. Just use Nix on a foreign distro or something if it bothers you that much.

Just use NixOS It's great, It integrates well with systemd, it has actual reproducible builds and isolated environments. I use both NixOS and GuixSD. NixOS is great for development (I mostly do C/C++ and Rust development with some Go). Nix with cargo is a godsend. Specifically nest.pijul.com/pmeunier/nix-rust
It's also amazing to just write a configuration file, put it on notabug or gitlab or whatever, and if I ever just need to reinstall just pull the config and that's that.

GuixSD is extremely young. I applaud them for moving everything to Guile. Guile is a nice language and is extremely easy to port to, I'm just not used to writing it yet. Guix graft's are kinda garbage though and have screwed up on me before. GNU Shepard is still in it's infancy and needs to mature more.

tl;dr: If systemd bothers you then use nix on devuan or something. You'll be missing out on a lot of cool stuff that NixOS does.

homebrew

Just make a tiny wrapper script or shell function that kills those processes after starting or exiting mpv.
mpv() { /usr/local/bin/mpv "$*"; pkill dbus };

Also dbus is some freedesktop.org thing, for IPC. Pretty useless unless you run desktop environment (I just use twm...)

Don't do this. Multiple arguments will be collapsed into a single argument that way. Use "$@" instead, it will properly expand into multiple arguments. It's almost always what you want.

I also recommend putting a semicolon after "pkill dbus". Some shells won't recognize the } as the end of the function definition otherwise.

I'm assuming you run mpv to play a single file or url, without arguments. The problem with $@ is it breaks when filename has spaces. To me that's annoying (having to quote filenames all the time).

That's a dangerous assumption.

If you quote it it follows the same rules as any other command, and passes the arguments exactly as received. Its behavior will match that of running mpv normally.

Just use your shell's auto-completion. It will put backslashes in the correct places.

And i do not want non root users to be able to fuck with packages.

Just like other package managers do, and without being language specific.

Does not work, still leaves one of the dbus processes running.
This works though...
mpv "$@"; pkill dbus; pkill dbus;

But what would a video player need it for?

DPKG.

The only thing it'd give you that portage doesn't in that case is a switch to print out 5000 lines of dependency resolver debug traces.

99% of perl upgrades can be done via perl-cleaner --reallyall && emerge -DatvuN @world; most of the time the problem is unnecessary shit pinned in /var/db/pkg/world that makes the resolver give up.

APT for separating dependencies into separate tiers (depends, recommends, suggests, enhances...), and all the extensions that are available (apt-transport-tor!).

track down why they exist and remove that package.

I recommend the use of app-admin/gentoo-perl-helpers for perl updates.
wiki.gentoo.org/wiki/Perl#app-admin.2Fgentoo-perl-helpers

About SOURCE.TAR.GZ. HOW TO BE SAVED. Ye Must Be Born Again! Salvation is by grace through faith Plus NOTHING! THE GIFT OF PROPHECY!

portage

I'm gonna be honest: npm. It's so simple and clear when you use package.json files EXACTLY what packages and versions are installed, and you have a very clear idea before ever typing in "npm install" of what's going to get pulled in. Yeah, the package.json for an entire operating system is gonna be huge, but fuck we have Ctrl+F for a reason.

Javascript developers, ladies and gentlemen.