Suleyman Farajli

The fact that I got the chance to contribute to the source tree of Gentoo Linux made me realise that it is not just that Gentoo is source-based and basically all the other ones are binary-based; in essence, it is much more than that, and Gentoo is the ultimate operating system.

Normally, operating systems are considered to be a combination of the underlying kernel and low-level system utilities used, but higher-level programs, i.e., package managers, are typically not considered. In that definition of operating systems, Gentoo Linux, Arch Linux, Debian, etc. all belong to one type of operating system: Linux, and to differentiate among them, the term "distribution" (or just "distro") is used. Here, I use a broader definition of operating systems that includes the kernel, system utilities, and even high-level user experience. Under this definition, each distro in itself would be a complete operating system.

Each operating system has a somewhat different way of managing packages (a.k.a. programs). In Windows and in macOS, the operating system is not responsible for package management, and every program is installed using an installer. Different installers can install software in different ways, resulting in non-systematized package management and ultimately chaos. To put it in perspective, let's say that program A is needed by both program B and program C. Since there is no systematized management, if you were to install B and C, you would end up with two different versions of A, but you only need one. That can use more disk space, decrease system performance, and make package management for the end user unbearable. So, basically, package management in those normie operating systems is total trash.

Ubuntu is no different. Though it pretends to have a package manager called snap, it ultimately is no better than macOS or Windows, because under the hood, snaps use containers. As a result, each snap is self-contained. Even in that case, dependency management is non-existent, and you can still end up with two different versions of the same package—not to mention containers are noticeably slower.

Binary OSes such as Debian or Arch Linux do handle dependencies pretty well. In those systems, users download precompiled binaries using the system's package manager. Binary packages are easy to maintain and install, making them very practical both for end users and package maintainers.

Arch Linux also has a user repository (a.k.a. AUR) in which packages are built from source, but it is completely different from Gentoo, which also builds from source.

You see, most programming languages have their own package managers, i.e., Python has pip, Lua has luarocks, Rust has cargo, but it is not considered best practice to use them, especially in a Linux environment, since they can interfere with the system's package manager. When using the AUR, those language-specific package managers can be invoked, but conflicts are avoided because the system’s package manager handles everything. It calls the language-specific managers as needed while maintaining overall control of the installation process.

Gentoo takes a different approach. Instead of using language-specific package managers, it provides a unified API for each programming language. This API is very consistent and allows you not only to install binaries but also to patch, compile, test, and install programs in multiple languages.

If building a package in the Gentoo environment is complex, that means the project has failed. If not, then the package is simple and elegant not only for Gentoo but for most systems, because Gentoo handles packages at the lowest level possible.

In conclusion, perhaps not the most pragmatic OS, Gentoo is thus far the most elegant one I have ever used.

copyleft (c) 2024-2025 Suleyman Farajli