When comparing YUM vs pkgsrc, the Slant community recommends pkgsrc for most people. In the question“What are the best Linux package managers?” pkgsrc is ranked 7th while YUM is ranked 15th. The most important reason people chose pkgsrc is:
pkgin aims to be a tool similar to apt/yum for managing pkgsrc binaries by relying on pkg_summary for installing, removing and upgrading packages and dependencies, using a remote repo.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Avoids dependency hell
All the metadata for installed software is stored into a XML file. This is used to avoid conflicting dependencies among packages. What's more, YUM also automatically syncs remote metadata to the local client in order to avoid failures if a command is not run at the correct interval.
Pro Simple syntax
Pro Binary delta for faster transfer times
Yum supports Delta RPMs which allow transmitting only the parts of the package that have changed.
Pro Is/was the industry standard
YUM is still widely used in corporate environments.
Pro Provides pre and post install sanity checks
What might be thought of a standard feature, isn't. Thankfully RPM provides both a transaction test and a post install verification to make sure everything installs neatly.
Pro Supports multiple verification methods
Supports verification with GPG and MD5.
Pro Clean and easy to understand
Pro Supports multiple compression methods
Supports gzip, bzip2, lzma, or xz compression.
Pro Allows for complex dependency definitions
Alongside allowing dependency on a certain package, it allows depending on a library, versioned symbol, or a GAC'd Mono assembly.
Pro pkgin is an apt-like tools for installing binaries from pkgsrc
pkgin aims to be a tool similar to apt/yum for managing pkgsrc binaries by relying on pkg_summary for installing, removing and upgrading packages and dependencies, using a remote repo.
Pro Adapted for use on over a dozen different operating systems
Has been adopted to be used on several Unix-like operating systems and Windows. It's also the default package manager of DragonflyBSD and of the (now discounted) Bluewall Linux distro.
Pro Installs and works in the same way as MacPorts
Installs its own dependencies which means that it is very secure. Cannot install anything unless you use the "sudo" command which is in keeping with the Unix philosophy.
Pro Both binary packages and source build possible
Fast software installation is possible by using binary packages. It's also easy to build from source which allows for different compile-time options (like different UI backends) as well as gaining access to pre-release versions of software in certain cases.
Pro Offering tooling for backporting fixes
Backporting fixes can be done by cherry-picking updates from a newer branch (pkgsrc is released every 3 months) and creating a package. Sometimes bugs need to be fixed for production and there is neither a fix in newer pkgsrc nor the softwares upstream. So pkgsrc has tools like pkgdiff, mkpatches, etc. that help with developing patches and building binary packages from that. A bit of documentation about that process can be found here.
Pro Does not need Xcode command line tools or Xcode.
This means that you can install it fresh on a new installation of MacOS and have all your favorite apps installed right from the start.
Pro Works easily with Ansible
Can be used from within Ansible to install packages on macOS.
Pro Easy installation if you use 3rd party scripts
This one works brilliantly.
Cons
Con Can be very slow to download headers if not on broadband
Yum can be much slower than other package managers if the internet speed is not at least average to high.
Con Slow (and might be fragile) dependency resolution
YUM dependency resolution is very slow. In addition to it, the people often experiencing very hard dependencies (it might be not a YUM problem).
Con Does fsync often
Like its successor, DNF, YUM does fsync too often. The result is poor YUM and system performance while YUM does its work.
Con Very slow overall
YUM is very slow - beginning with relatively slow startup, extremely slow default plugins, slow dependency resolution, and ending with slow installation of packages.
Con Poor design
YUM is written in Python 2 and people often blaming the quality of YUM's code.
Con Relatively complicated setup and installation
Installing and setting pkgsrc up is a bit more complicated than in other package managers where it often consists in running a single script.
Con Not so broadly used on MacOS as compared with MacPorts
You do not hear about Pkgsrc as openly as you hear the words "HomeBrew" or "MacPorts".
Con Outdated packages
Some packages are outdated.
Con Can't install some packages
Even building well known packages (except MacPorts) from source using the ports can fail.