Does running ``# portupgrade -arRp '' prompt for options or updates everything without prompts?

Polytropon freebsd at edvax.de
Thu May 5 23:33:57 UTC 2011


On Thu, 5 May 2011 17:50:28 -0500, Antonio Olivares <olivares14031 at gmail.com> wrote:
> Tried to do this:
> # portupgrade -f ruby
> # rm /var/db/pkg/pkgdb.db
> # portupgrade -f ruby18-bdb
> # rm /var/db/pkg/pkgdb.db /usr/ports/INDEX-*.db
> # portupgrade -af
> 
> Did not work correctly[too many customizations] and Tried again

I think "customizations" refers to the "make config"
screens, correct? It's the typical kind of interaction
that _nobody_ likes. :-)



> I had many packages that need to be updated so I am running :
> 
> # portupgrade -arRp
> 
> will this prompt me for customizations?

The -P (and -PP) parameters requests precompiled binary
packages - there is no way to configure them (as they have
already been built using the port's default options).
However, as soon as a package is not available, portupgrade
will install the port from source (so make sure your
ports tree is up to date), and it MAY happen that there
is a "make config" interaction.

The portupgrade program has a --batch parameter that
reflects the BATCH=yes option for make calls (as if you
would use "make install").

The "decision tree" is as follows:

Port can be configured?
	Yes.
		Port has already been configured?
			Yes.
				Build it with that options.
			No.
				Ask for options.
				Then build it with that options.
	No.
		Build port.

This applies if there is no package (which you require
with the -P parameter to portupgrade).

Make sure you've understood the upgrading procedures for
the system and the installed applications correctly.
There _may_ be better tools than portupgrade for dealing
with the second part (e. g. portmaster, portmanager).
The command line parameters you've collected make portupgrade
perform a "pkg_add-like upgrade" the binary way.

Also note the correct order of the upgrade steps:
1. Upgrade system (with freebsd-update)
2. Upgrade ports tree (with portsnap)
3. Upgrade installed software (with portupgrade)

As I've mentioned, there are other tools that could take
the place of the "with *" suggested above, but I think
this is the way you intend to go.

Just as an example, "make config-recursive" allows you to
do all the config screens in one run, one after each other,
and as soon as the settings got saved, they will be used
without any further questions. See "man ports" for details
about the several build targets; also see "man portupgrade"
of other options you might need to create a non-interactive
way of upgrading your installed ports.


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


More information about the freebsd-questions mailing list