tuning the behaviour of the -u option?

René J.V. Bertin rjvbertin at gmail.com
Fri Dec 23 15:30:12 CET 2016


On Friday December 23 2016 15:58:12 Clemens Lang wrote:

> This becomes simpler with the interactivity code that's currently on
> master and scheduled for 2.4. If you run 'port uninstall $port' and you
> have multiple versions installed, you'll get a list and a prompt to
> select which versions to uninstall.

I know, I already have that. It's very useful, but kind of complementary to an automatic option to uninstall old versions.

> 
> > or (easier to implement and guarantee) the currently active
> > version/variant.
> 
> 'inactive' never matches active versions, so this is already the case
> when you run sudo port uninstall inactive?

With current I mean the port that's active when you invoke the upgrade command, not when the cleanup is done. Suppose:

{{{
%> port installed foo
foo @0.9.0
foo @1.0.0 (active)
%> port info --version foo
version: 1.1.0
}}}

When I run `port -u upgrade foo` I will only have v1.1.0 installed afterwards. Whereas with a hypothetical

{{{
%> sudo port -u upgrade --keep-current foo
%> port installed foo
foo @1.0.0
foo @1.1.0 (active)
}}}

The idea is of course to be able to roll back easily, though by uncoupling the principle from a version number you could probably also use it in different scenarios. Sadly not for contexts like

{{{
%> port installed opencv
opencv @3.1.0_5 +qt4
opencv @3.1.0_5 +qt5 (active)
}}}

where you'd like to be able to upgrade both variants with a single command, regardless of whether you also want to keep (just) the current version around for rollback.

R.

R.


More information about the macports-dev mailing list