portmaster is not always recursive

Doug Barton dougb at FreeBSD.org
Fri Aug 21 04:23:10 UTC 2009


Woo hoo! I found the bug, and fixed it in the just-committed version
2.10. The bug was in the NO_DEP_UPDATES flag which is one of the
oldest features of portmaster. It operates in the first pass through
the dependencies (aka config mode) and if all of the dependent ports
are up to date it allows the second pass (build mode) to skip the
dependency check(s) altogether. When I first added this feature (prior
to the use of variables to store information on up to date
ports/dependencies) this was a great time saver. It's not that
important anymore given that dependency checks are so much faster, but
it still helps some (especially if you are building/installing a lot
of ports) and it has been overloaded a bit for other purposes.

Unfortunately it didn't quite keep up with the times when some code
paths were added (such as -r and the new code to do multiple ports on
the same command line) and it was not always being unset when it
should have been. The more common code paths (one port on the command
line, or -a) didn't have this problem, which along with the fact that
it only happened with certain combinations of out of date dependencies
is why the bug went undiagnosed for so long.

Ironically the flag was also being UNset at times when it should not
have been (for similar, although somewhat different reasons) so in
cases where you are building a list of ports (like multiple ports on
the command line or -r) and all of the dependencies are up to date
there will be a slight performance improvement. This side of the bug
would never have been noticed by users since it only resulted in some
unnecessary dependency checking.

FWIW there is one more small performance improvement in 2.10 for
building multiple ports on the command line, although the percentage
of performance increase is probably quite small.

Thanks Miroslav for providing all of the information you did which was
a big help in allowing me to narrow down where the bug was _not_ which
ultimately allowed me to find out where it was. :)


Doug

-- 

    This .signature sanitized for your protection



More information about the freebsd-ports mailing list