On Dec 8, 2011, at 13:53, Bradley Giesbrecht wrote:

> On Dec 8, 2011, at 10:03 AM, Roger Pack wrote:
> 
>> I would like to suggest a change then that "-f" force a
>> reconfigure/remake etc.,
> 
> I am confused.
> 
> Reading man port:
>     -f       force mode (ignore state file)
> 
> 
> Yet a second run with -f produces:
> $ sudo port -sdf configure mysql5-server 2>&1 | grep Skipping
> $ sudo port -sdf configure mysql5-server 2>&1 | grep Skipping
> DEBUG: Skipping completed org.macports.fetch (mysql5-server)
> DEBUG: Skipping completed org.macports.checksum (mysql5-server)
> DEBUG: Skipping completed org.macports.extract (mysql5-server)
> DEBUG: Skipping completed org.macports.patch (mysql5-server)
> DEBUG: Skipping completed org.macports.configure (mysql5-server)
> 
> 
> In what context is the state file being ignored?

I am not certain why the manpage says that "-f" ignores the state file; that's 
not what it means. Maybe it used to mean that; I don't recall.

You should probably not use the "-f" flag, unless you understand what it does 
in the context in which you're using it and are ok with the consequences.

"-f" is used for example to force the activation of a port that MacPorts 
wouldn't otherwise activate because at least one file of the same name is 
already installed. This is usually an error and should usually not be done. For 
example, perhaps you have a conflicting port active (deactivate it first), or 
perhaps you manually installed files into the MacPorts prefix (delete them 
first).

In fact "-f" used to mean many things, though we've tried to reduce the number 
of meanings. For example, "-f" used to be used if you wanted to force a port to 
upgrade that didn't need to be upgraded -- in other words, to just rebuild a 
port. But some versions ago, we changed that to make a new "--force" flag 
that's specific to the upgrade target, so now to do that you use "sudo port -ns 
upgrade --force foo".


If, during the course of portfile development, you want MacPorts to re-run a 
phase it's already done, either clean the port to start over from the beginning 
(which MacPorts would do anyway if you had edited the portfile, unless you use 
the "-o" flag), or edit the state file and delete lines from the end for each 
phase you want to re-run.


_______________________________________________
macports-users mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users

Reply via email to