port install efficiency issue

Rainer Müller raimue at macports.org
Sun Mar 22 14:02:04 PDT 2009


Daniel J. Luke wrote:
>> If nobody can think of a valid use for this check we should just  
>> drop it.
> 
> It is somewhat useful when one is developing a new port (since you  
> don't have to remember to clean before you rebuild after changing the  
> Portfile), and there's the -o flag one can use to change the behavior.

This is not what -o does. port -o is to ignore the fact
that the Portfile is newer than the state file (usually in
work/.macports.foo.state). This happens when you had a failing build, do
a sync which hopefully gets a fixed Portfile and then run the install
again. In this case, port will recognize that the Portfile was changed
since the earlier attempt and automatically cleans and starts over.
port -o overrides this check and continues despite the state file being
older than the Portfile.

But what we discuss here, is the comparison of the Portfile modification
time with the time of installation. This affects all phases currently,
so you cannot run 'port extract foo' or anything if you already have
port foo installed. You would have to use force. But if the Portfile is
newer than the currently installed version, then it will continue, but
error out in the install phase because a port with exact same
name/version/revision/epoch/variants is already installed.

Rainer


More information about the macports-users mailing list