Forcing a recompilation of an installed port without uninstalling

Joshua Root jmr at macports.org
Tue Jan 20 20:57:01 PST 2015


On 2015-1-21 06:22 , Lawrence Velázquez wrote:
> On Jan 20, 2015, at 7:08 AM, René J.V. Bertin <rjvbertin at gmail.com> wrote:
> 
>>> Single-dash single-letter flags like "-f" are "global" and have no effect unless placed after the word "port" and before the command verb (e.g. "sudo port -f uninstall"). Double-dash multiple-letter flags like "--force" are specific to the command verb in question, so they must be placed after the command verb and before any subsequent arguments (e.g. "sudo port -n upgrade --force").
>>
>> That's not exact in my experience. It happens often enough that `port install` runs into stray files under ${prefix} (left there because of me, not MacPorts). Adding -f *after* the install verb has always worked for me in those cases.
> 
> If that's the case, it's a bug in port(1)'s option-parsing, and you should not rely on it.

I think it's more like the activate code has its own local force option,
which is normally inherited from the global one.

As for why upgrade --force is separate from -f:
<https://trac.macports.org/ticket/20156>
<https://trac.macports.org/ticket/16061#comment:2>

- Josh


More information about the macports-dev mailing list