Ubuntu’s popularity often makes it the default choice for new Linux users. But there are tons of other Linux operating systems that deserve your attention. As such, I’ve highlighted some Ubuntu alternatives so you can choose based on your needs and requirements—because conformity is boring.

  • 2xsaiko@discuss.tchncs.de
    link
    fedilink
    arrow-up
    3
    ·
    7 months ago

    Apt is the greatest package manager ever built.

    Urgh, no, it’s not. Everything about it is super crusty if you go beyond simply installing packages and adding others’ PPAs IMO.

    1. Packages often enable the services they install right away. Someone told me they got locked out over SSH because they installed a firewall package that locked everything down by default, and the service got started on install. I guess that’s technically more of an issue with the way things are packaged rather than the package manager itself, though.
    2. To temporarily install a package (so that it will get uninstalled with the next autoremove) you need to use aptitude to install the package, or run apt-mark auto after installing (which will also clear the manually installed flag if it was manually installed before), apt has no syntax for it.
    3. dpkg-scanpackages is eternally slow, I had to write a wrapper for it that runs it separately for every package and caches the result because I didn’t want to wait multiple minutes for it to rebuild the PPA package index
    4. The standard packaging tools (dh-make or debuild, I think I’ve looked at both) are insane, so much so that I gave up and wrote something that takes files similar to Arch PKGBUILDs which calls dpkg-deb at the very end.

    I could probably list more but I haven’t had to touch apt in a while, thankfully. But it is probably the #1 reason I avoid anything Debian-based. #2 is probably their Frankenstein sysvinit/systemd setup.

    I do have to say that apt remove vs purge is pretty cool though.

    What do you like about it?

    • cbarrick@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      7 months ago

      Packages often enable the services they install right away.

      That’s a problem of the package, not the package manager.

      Generally this fits with Debian’s philosophy. But regardless I think it’s out-of-scope for why Apt is good. You could make a distro with Apt and not have your packages do this.

      To temporarily install a package […]

      I’m not talking about apt the CLI tool, but the actual package manager. The plain apt tool is only designed to be a convenience wrapper for common workflows implemented in other tools.

      As you correctly pointed out, Apt has the distinction between packages installed as a dependency (“auto installed”) versus packages installed directly (“manually installed”). This is precisely one of the reasons why I consider Apt the best package manager. (Yes, I know other package managers can do this, not all though.)

      If you want to install a package as manual, then later mark it as auto, you can do that with apt-mark.

      dpkg-scanpackages is eternally slow.

      Are you maintaining a PPA for others?

      Frankly, I’ve never run into this problem.

      The standard packaging tools […] are insane.

      dh_make helps you create a package that adheres to Debian policy, and there is good reason for Debian to have those policies. But if you’re just packaging something yourself, you don’t have to use it. It’s just a template for new packages.

      At the end of the day, all you really need to create a deb is to create two files debian/control and debian/rules. These are the equivalent to a PKGBUILD. The control file specifies all of the dependency metadata, and the rules file contains the install script.

      The difference in packaging philosophy is that PKGBUILDs are external and they download the upstream sources. On the other hand, in Debian, they rehost the upstream package and add the debian directory. This means that building Debian packages is mostly hermetic: you don’t need access to the network.

      What do you like about it?

      Mostly that it makes super useful distinctions between concepts. But there are other goodies.

      • Manually installed versus auto installed.
      • Uninstalled versus purged.
      • Upgrade versus Dist Upgrade.
      • Dependency versus suggestion versus recommendation.
      • The alternatives system.
      • Pinning, and relatedly that packages can include version constraints in their dependencies.
      • Interactive configuration at install time.
      • Support for both source and binary packages.

      I also do appreciate that Debian pre-configures packages to work together with the same set of conventions out of the box. But again, that’s a property of the packages, not of Apt.