When comparing DPKG (Debian Package Manager) vs pkgsrc, the Slant community recommends DPKG (Debian Package Manager) for most people. In the question“What are the best Linux package managers?” DPKG (Debian Package Manager) is ranked 3rd while pkgsrc is ranked 7th. The most important reason people chose DPKG (Debian Package Manager) is:
DKPG has one of the best multiarch support you can easily add new architectures with dpkg --add-architecture $ARCH to install foreign architectures.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Great multiarch support
DKPG has one of the best multiarch support you can easily add new architectures with dpkg --add-architecture $ARCH to install foreign architectures.
Pro Follows the UNIX philosophy
DPKG and it frontends follow strictly the UNIX philosophy that one package should do one thing well.
eg:
Dpkg: does simple package management
APT and aptitude : adds repository and dependency tracking
debconf: does configuration
synaptic: allows mouse interaction to all apt/aptitude options
Pro De facto package manager / widely used
Due the popularity of Ubuntu, Debian and Linux Mint it is almost certain that you find the package you want as a pre-built deb package.
Pro Fast
DPKG isn't as bloated as other package managers since it is only made for local package management.
Pro Plenty of frontends
You can use apt, aptitude, cupt, debdelta or apt-build on the terminal.
Pro Very easy to create packages
There are plenty of helpers to easily create packages.
You just need to create 5 files: source/format, compat, rules, control & changelog and run dpkg-buildpackage.
Pro User interaction
It is possible to interact/ask questions to all pre and post install scripts. This makes it possibe to add questions for package configuration or to display EULA/License screens that have to be accepted before installation.
Pro Standard archives
Deb packages are simple ar archives with additional tar, lzma, bzip, gzip support.
Pro You can create deb packages on almost all linux distributions
This makes maintenance and support easy.
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 Does not work well with packagekit
Since packagekit was developed with rpm in mind it does not support all dpkg features.
Con Package creation needs more than one file
A debian package needs at least the following files to build it with debhelper
debian/source/format - deb format
debian/changelog - changelog file with version number and dae etc.
debian/compat - debian package version
debian/control - package information, dependencies & co
debian/copyright - license information
debian/rules - the make file to build the package
However the really important files are control, changelog and rules all other are generic.
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.