redo destroot after tweaking build?

"René J.V. Bertin" rjvbertin at gmail.com
Mon Aug 4 02:58:56 PDT 2014


On Aug 04, 2014, at 11:28, Ryan Schmidt wrote:

> Normally, if a state file exists, MacPorts compares the checksum of the portfile with the checksum previously stored in the state file, and if they don't match, it cleans the work directory first. "-o" means don't do that, so if anything it should be very slightly faster.

It is, more than just slightly in fact. Without -o it takes about the same time to decide ... and then starts from scratch. O:-)
 
> Remember that single-letter flags like "-f" must go immediately after the word "port" (e.g. "sudo port -f destroot", "sudo port -f build") and have no effect if placed elsewhere on the command line.

Eh? Then why is it that `port activate -f` that I have to use sometimes to override files already present works?

> Rewinding 1 level seems to be an odd behavior to add. What if, for example, you had already completed the destroot, and then ran "sudo port -f extract"?

I suppose the same thing as would happen without rewinding. I.e. nothing. I meant rewinding 1 level above the current level, not above the requested level:

- rewinding 1 level above current: nothing happens, because the current state is still ahead of the requested step. Useful? I don't see how, but the user asked for it :)

- rewinding 1 level above the requested step: in this case, `port -f extract` would become a shortcut for `port clean ; port extract`. Has more effect than the 1st alternative, but this would also remove the interest of `port destroot ; port -f destroot` (which would become `port destroot ; port clean ; port destroot`).

Of course `-f` could also disregard the recorded state altogether, which could also have its use. Like restore a (large) source tree to the current MacPorts version after tweaking around in it, and letting the underlying build system figure out what to rebuild.

R.


More information about the macports-users mailing list