When comparing Portage vs DPKG (Debian Package Manager), the Slant community recommends Portage for most people. In the question“What are the best Linux package managers?” Portage is ranked 2nd while DPKG (Debian Package Manager) is ranked 3rd. The most important reason people chose Portage is:
WIth portage you can decide and customize which dependencies to install through some thing called USE flags. These are keywords that when defined, will tell Portage that you want support for the chosen keyword.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Decide which dependencies to install
WIth portage you can decide and customize which dependencies to install through some thing called USE flags. These are keywords that when defined, will tell Portage that you want support for the chosen keyword.
Pro Sandboxes build process
Portage uses a sandbox as a safety measure during build processes. This is done to ensure that no packages accidentally write outside a 'safe' location.
Pro Can install multiple versions of the same package simultaneously
Slotting is a feature which allows users to install multiple versions of a software simultaneously. This is especially useful for libraries which have changed interfaces between versions.
Pro Allows both binary and source installation
With portage you can either compile packages from source or you can download and install their binary versions.
Pro Simple overlay management
Adding supplemental repositories, aka overlays, is easy with eselect-repository or layman.
Pro Implements a standard with alternate implementations
If you need faster resolution, you can run pkgcore for search and portage for installing, and they work well together.
Pro Respects customized config files
By default, portage doesn't delete or move any customized config files, thus enabling competent users to modify any config file however they want.
Pro You can view a list of programs that can be installed
With portage you can view a list of all the programs that you can install by going to /usr/portage
and running ls
.
Pro Full control over installed packages
You can fully control all packages if you use it properly.
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.
Cons
Con High memory usage
Usually takes between 400-800MB of RSS (no problem to get over 1GB), so it's nothing for an old hardware.
Con Building from source take a lot of processing time
Most of Portage's pros are related to its "porting" process, building packages from source. This is very resource-intensive, with the few biggest packages sometimes taking even multiple hours to update or install.
Con Very slow
Dependency resolution is very slow and single-threaded, so usually you will see one of your cores running like crazy for over a minute.
Con Feature creep
It is very complicated and offers plenty of options.
Con You can not create packages under a non-portage distribution
Makes maintaining software for gentoo based systems a burden.
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.