Do I want to switch to the new pkg(8) format?

Polytropon freebsd at edvax.de
Fri Dec 26 23:21:22 UTC 2014


On Fri, 26 Dec 2014 14:57:44 -0800, Chris Stankevitz wrote:
> 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

By "management", also keeping the system's records about
packages (what is installed, which dependencies exist,
where did files get written to, etc.) is meant. Tools
like portmaster or a simple "make install" also cause
those steps to happen.



> "portmaster is the recommended tool for upgrading installed ports"
> -Handbook section 5.5.3.1

You can upgrade from source - and use portmaster, or you
can upgrade binarily - by using pkg. This works whenever
you do not have custom options set when building from
source.

When you build from source, you basically build a binary
package (compare "make package"), and then, this package
is being installed. This is nothing much different from
the path of obtaining precompiled packages from an external
source and then installing those.



> If both statement are indeed true, then I must conclude:

Your statements aren't wrong per se, but not formed in a
way that doesn't allow misunderstandings. :-)



> 1. Upgrading ports is not a "package management" operation.

It is, as explained.



> 2. There are many different "operations" you can do with ports and packages.

Correct.



> 3. Each "operation" might use a different tool.  Sometimes pkg,
> portmaster, portsnap, make, cvs, pkg_, portsclean, portupgrade, etc.

Allow me to summarize and clarify:

pkg -> install, upgrade and remove installed software,
       keep system database about installed stuff and
       the depdendencies that may appear

portmaster -> interface to the ports tree when building
              from source, also allows upgrading, but can
              also be used to deal with binary packages
              (see -P and -PP options)

portsnap -> obtain the latest ports tree (snapshot, often
            not 100% current, but close) in a compressed
            format

make -> generic interface to Makefiles that control how
        certain ports actions are performed (install,
        update, deinstall, reinstall, package, fetch,
        patch and so on)

cvs -> DEPRECATED - tool to check out ports tree from the
       version control system; today svn (subversion) is
       being used for interaction with the version control
       system

pkg_ -> DEPRECATED - collection of tools to deal with
        binary packages

portsclean -> see "man portconfig"

portupgrade -> comparable to portmaster




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list