Do I want to switch to the new pkg(8) format?
Dale Scott
dalescott at shaw.ca
Fri Dec 26 23:41:19 UTC 2014
> On Dec 26, 2014, at 2:57 PM, Chris Stankevitz <chrisstankevitz at gmail.com> wrote:
>
>> On Fri, Dec 26, 2014 at 9:59 AM, Warren Block <wblock at wonkity.com> wrote:
>> No, both binary packages and ports require pkg now. It is the only
>> supported package management tool, and installing ports *is* installing
>> packages.
>
> Warren,
>
> Thank you for your replies. I appreciate how careful you are being
> with your language. Keeping in mind that my FreeBSD vocabulary is not
> up-to-snuff, can you explain how these two statements can both be
> simultaneously true:
>
> "pkg is the only supported package management tool (and installing
> ports *is* installing packages)" -Warren Block
>
> "portmaster is the recommended tool for upgrading installed ports"
> -Handbook section 5.5.3.1
>
>
> If both statement are indeed true, then I must conclude:
>
> 1. Upgrading ports is not a "package management" operation.
My thinking is that a) the ports system is how software is adapted to FreeBSD, b) applications can have build options (typically configured via "make config" before "make install"), and c) if you can live with the "default" options, then installing pre-compiled packages ("pkg install foo") saves considerable time.
If you are using pre-compiled packages, then "pkg upgrade" upgrades them. If you are compiling from ports, postmaster is my preferred tool to upgrade ("portmaster foo") (but there are other tools also). If you are using some packages and installing others by compiling from the ports tree, then you will have to "pkg lock" the ones you are compiling yourself to prevent "pkg upgrade" from upgrading them using pre-compiled packages (with the "default" options, not the options which you need, which necessitated you to compile them yourself in the first place), upgrade the packages ("pkg upgrade"), then unlock, upgrade them with portmaster (which will respect your selected options), then "pkg lock" them again.
As someone else noted, pkg is getting smarter every day and will soon be able to sort out exactly how to upgrade (and may even be able to now).
>
> 2. There are many different "operations" you can do with ports and packages.
>
> 3. Each "operation" might use a different tool. Sometimes pkg,
> portmaster, portsnap, make, cvs, pkg_, portsclean, portupgrade, etc.
Portsnap is a tool to quickly way update your ports tree, but you still have to compile a port yourself.
The cvs management tool was used for the freebsd operating system itself, but has now been replaced with Subversion (svn).
Portupgrade is an alternative tool to portmaster.
All the pkg_* tools have been replaced by pkg.
> Thank you again,
>
> Chris
All the flexibility was confusing when I started with freebsd, but it was still less confusing than the differences between the Linux distro's. Google showed me the popular strategies, and then I just stuck with one.
Good luck!
Dale
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
More information about the freebsd-questions
mailing list