4 ms·
Can someone debunk the myth I read about the FreeBSD package management system? In Debian/Ubuntu/Mint style Linux it's enough to use apt-get update apt-ge
by frik 10y ago
Can someone debunk the myth I read about the FreeBSD package management system?
In Debian/Ubuntu/Mint style Linux it's enough to use
apt-get update
apt-get upgrade
and only the changed packages including all interdepencies are downloaded and installed in the correct binary form (x86/x64/arm...).
How does FreeBSD really handles package management and is it ahead or behind the current state-of-art in this respect? And what is on the roadmap to improve the status-quo (in case there is a need)?
- Sanddancer 10y agopkg-ng was added a few years ago, and makes updating super easy. pkg update pulls a new package list, pkg upgrade installs. For installs, pkg add, for deinstalls, pkg delete. It also uses sqlite as its database format, so it's a lot easier to build tools around for querying and maintaining systems.
- ivoras 10y agoThat particular case - upgrading everything - is actually supported pretty well. Of course, there's the distinction between the base system and app packages - the base still needs to be upgraded another way (freebsd-update). It's the much more useful case of upgrading complete subgraphs of package dependencies that still wasn't implemented when I last looked at it a year ago. If you have application packages A1 and A2 installed, and a library package L on which both of them depend on, then if you upgrade A2 to a newer version which requires (and is linked against) a newer version of package L, pkgng will simply not upgrade both L and A1. The pkgng devs simply declared this to be out of scope. For a time, pkgng (now just "pkg" as it's the only one) looked like it could be the best thing since sliced bread, only for the devs to arrogantly dismiss the most common dependency-related operation used in practice. It's the single biggest issue which turned me away from FreeBSD, since I don't want to write package manager code, don't want to maintain my own package repos, and don't want to track "snapshots" (i.e. 6-months old "freezed" package repos, without security updates) which are the three "workarounds" proposed to me at the time. This is important because FreeBSD's ports and packages are on a "rolling release" model, i.e. often (daily/weekly, depends on the maintainer) updated to the latest upstream version, so the lack of complete subgraph package upgrades regularly leaves you with broken apps.
- tete 10y agoIf you just want to update your system it's: pkg update pkg upgrade Or just: pkg upgrade This will do mostly what apt-get does (unlike apt and more like many others) it won't start or restart services. You also have stuff like autoremove, clean, which (for checking which package owns a file), etc. See the commands section for pkg: https://www.freebsd.org/cgi/man.cgi?query=pkg#COMMANDS https://www.freebsd.org/cgi/man.cgi?query=pkg#COMMANDS