I have been using linux for about 2 years now and I have enjoyed every second of it. What in your opinion is the best package manager the linux community has ever offered to us? dpkg, apt, yum, pacman, xbps, zypp, nix, guix, portage, 0install and other tons of them that are out there.

  • doodie@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    4 years ago

    I’ve been using Nix on NixOS for a couple of years now, can’t imagine going back.

  • adrianmalacoda@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    4 years ago

    I’m very fond of Guix for a few reasons:

    • functional package management. Every package in the Guix store is in its own isolated directory (identified by the hash of that package + its dependencies) and every package knows where its dependencies are in the store, so you can have packages that depend on conflicting versions of libraries, for example.
    • transactional system upgrades, and ability to roll-back to a previous version of the system if an upgrade goes wrong somehow
    • per-user package management (each user has their own set of packages that doesn’t require root to manage)
    • packages/repositories (“channels”) are declared in a programming language (Scheme; not my choice of language but a language nonetheless) and version-controlled as git repos
    • packages are built from source by default but can also be available as pre-built binaries (“substitutes” in Guix lingo) if a trusted CI server has them available. I think this is the “best of both worlds” of a binary and source based package manager (this does come with an annoying pain-point, where you don’t really know if you’re going to get pre-built substitutes when you run guix upgrade, especially as packages that are less trivial to build also end up more likely to not be available from the CI server)
    • being able to install a package from a different source (e.g. a tarball, git branch/commit) (guix install --with-source, --with-branch, -with-commit, etc)
    • the default repository adheres to GNU’s free distro guidelines, which is always (for me) a plus. That being said, there’s maybe a dozen user-created channels with non-free kernels and non-free apps if that’s your thing too.

    Package Management section of Guix manual


    Now, one thing I don’t like about Guix is that its unconventional approach to package management often makes building more complicated packages a challenge, because those packages have to be patched to behave properly in the Guix environment.

  • gmes78@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    4 years ago

    Pacman is great. It may not be the best package manager out there (I haven’t tried them all), but it’s simple, fast, and, most importantly, trivial to create packages for (which is the reason the AUR exists, and why it’s so good).

    • Doug@lemmy.ml
      link
      fedilink
      arrow-up
      0
      ·
      4 years ago

      I’ve never used flatpak or snap.d, what advantage do they have over normal apt or dnf?

      • marmulak@lemmy.ml
        link
        fedilink
        arrow-up
        1
        ·
        4 years ago

        Well it’s kind of hard to explain so I hope I do a good job, but package managers like deb and rpm often have packages that involve a complicated set of dependencies and way of handling files that’s tied into the base system. What flatpak does is it brings its own environment separate from the system it’s running on, so like any flatpak program could run on any system provided some basic conditions are met like the system is Linux and there’s an X server running.

        Packages ought to be statically linked and have things they require bundled with them, but they can depend on a “platform” like “Gnome 3.36” or “KDE” that flatpak also provides, so the things most programs rely on flatpak does supply outside of the package itself.

        Additionally flatpak’s update mechanism is ostree (I believe), so even though it might have large packages, updates to them are handled at a more fine-grained level, so the whole package doesn’t get updated just the files that changed get updated.

        So considering some compromises overall, yes it takes up more space, but not too much more space, it updates fast and reliably, and the end result is that you get packages that are basically just end user applications completely bundled and compatible with nearly all Linux distros. The package is the same, doesn’t care if it’s running on Ubuntu or Fedora or Arch or Suse or…

        So anyway yes it has its drawbacks, but I use it on Fedora and it works well for specific things that I choose to use it for. I don’t use it for everything. (I don’t think it’s designed for that.) It is useful in some scenarios, like some closed-source apps (Skype, Anydesk, Spotify, Steam). You push a button and it installs. No hassle. If the software has funny or outdated dependencies, you’re taken care of. Software vendors can choose to provide their application as a flatpak only and it “runs on Linux”, so that’s all they have to care about, not having to maintain a package for each individual distro. For some particular projects that choose flatpak, you get the latest updates direct from the project itself. (In my case, Gajim is a newer version on Flathub even than on Fedora itself, some good projects like Veloren use it.) For the end user it’s zero effort, though I heard it’s strange or unique to package for so for projects/vendors it’s an investment.

        It seems to work well for games and desktop applications. It’s not going to handle system services and OS-level stuff, rather it’s more user-oriented. Something else I didn’t mention is that flatpak is supposed to sandbox the apps so they often run contained, but many apps need to be able to access files in t he user’s home directory anyway. I’ve heard the sandboxing criticized before, but for what I use it for I’m happy with it. It offers some things my distro doesn’t, and many things it does.

        Unfortunately I don’t have much experience with snap. I tried it before once on Ubuntu and it seemed OK but for me at the time it appeared intolerably slow for some reason. I actually switched this machine from Ubuntu to Fedora in part so that I could use flatpak, and I feel it was worth it. For some reason Flathub had more packages I wanted than Snap did. Also keep in mind flatpak’s deal is it’s distro-independent, but I heard snap is basically an Ubuntu-only thing. I don’t know.

        Also it’s worth pointing out that flatpak is not alone in bringing its own everything. guix does that too, so you could install and run guix alongside any distro. I’ve run guix on Fedora too but it wasn’t worth it really, although guix system distribution is so cool.

        • Adda@lemmy.ml
          link
          fedilink
          arrow-up
          1
          ·
          4 years ago

          This is really a nice explanation. Again, I know a little more now. Thank you for that.