Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Dec 2014 01:52:42 +0100
From:      Polytropon <freebsd@edvax.de>
To:        Chris Stankevitz <chrisstankevitz@gmail.com>
Cc:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: Do I want to switch to the new pkg(8) format?
Message-ID:  <20141227015242.6fe2738c.freebsd@edvax.de>
In-Reply-To: <CAPi0psv8V7=VZUJS4ND-d=gx4Rh16q8p3p-y2Naac0WCRzcT2w@mail.gmail.com>
References:  <CAPi0psuei36LjMFT_B7DF3dWhTz=RK28r-kxKdyeNJx1YSapdg@mail.gmail.com> <CAPi0psv8V7=VZUJS4ND-d=gx4Rh16q8p3p-y2Naac0WCRzcT2w@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 26 Dec 2014 16:30:39 -0800, Chris Stankevitz wrote:
> Thank you all for your help.  A summary:
> 
> 1. Packages can be installed from "source ports" or "binary packages".
> -- actually I knew that all along but thank you to you all for remind
> me so many times.

Correct. Keep in mind that "source port" doesn't _neccessarily_
require source. The ports tree also contains software that is
not available in source form, for example the "Flash" stuff:
In this case, "make install" will download and install binary
software that isn't being compiled on your system, because
the code is not open source.



> 2. To install a binary package use "pkg"

Yes.



> 3. To install a "source port" use "make"

Or a port management tool; portmaster can be used to install
software that's currently not on your system, and it can do
this in both ways - from source or via binary packages.



> 4. To uninstall a "binary package" use "pkg"

Yes.



> 5. To uninstall a "source port", use "pkg" or use "make deinstall"

Yes.



> 6. To upgrade your "source ports" use "portsnap fetch install" and "portmaster".

Try to say it in a more correct way: With portsnap, you will
update your ports _tree_ (/usr/ports), and with portmaster,
you will update your _installed_ ports (/usr/local).



> 7. To upgrade your "binary packages" use ???? (don't really care...
> but just adding it to be complete)

You can use pkg here.



> 8. To remove unneeded "source ports", use "portmaster -l" or "pkg auto
> remove" (even though this is described in section 5.4 of the handbook
> "Using pkg for Binary Package Management").  Do not use pkg_cutleaves.



> 9. Do not use cvs or pkg_ or pkgng

CVS and the pkg_* tools cannot be used anymore (except you're
running an older version of FreeBSD, but the required counter-
parts, server-wise, don't exist anymore). NB: pkgng == pkg.



> 10. If you are ever asked "to switch to the new pkg(8) format" say
> YES, even if you are using source ports.

Yes. And it will only happen on older installations (v9).



> 11. If you are feeling frisky, upgrade your source ports with
> portupgrade instead of portmaster

This is a question of preference: some people use portupgrade,
others prefer portmaster. In terms of functionality, they are
considered "almost the same", even though portmaster seems to
receive more active development and evolution.



> And summarized even further:
> 
> - When you want to install a binary package, use pkg

Yes - except, of course, you use portmaster -P, but in the end,
this involves pkg in the mentioned manner.



> - When you want to list or remove installed software, whether it was
> installed via source or binary packages use pkg

Correct, pkg offers the tools that interface with the system's
database.



> - When you want to install or upgrade using source use (portsnap AND
> make AND (postmaster OR portupgrade)).

Let's split this apart:

	1: update = ( svn | portsnap )

	2: install or upgrade = ( make | portmaster | portupgrade )

Note that especially tasks like "update the tree, then update the
installed stuff" are easier to achieve with portmaster than with
make, even though it's possible. But imagine you have to walk
through your ports tree and "make deinstall && make reinstall"
in every imaginable weird order, compared to what the EXAMPLES
section of "man portmaster" has to offer. :-)




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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141227015242.6fe2738c.freebsd>