portmaster is not always recursive

Miroslav Lachman 000.fbsd at quip.cz
Fri Aug 21 11:53:52 UTC 2009

Doug Barton wrote:
> 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.

Code for multiple ports can explain my problems discribed with 
amavisd-new and spamassassin, as I use upgrade of more ports in one 
command very often.

> 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. :)

Thank you for your hard work!

I can confirm that bug was fixed in 2.10, it passed my test with -r 
jpeg-7 ;)

root at lite ~/# portmaster portmaster-2.9

===>>> Upgrade of portmaster-2.9 to portmaster-2.10 complete

root at lite ~/# portmaster -r jpeg-7

===>>> The following actions were performed:
         Re-installation of jpeg-7
         Upgrade of png-1.2.35 to png-1.2.38
         Re-installation of gd-2.0.35_1,1
         Re-installation of mrtg-2.16.2_1,1
         Re-installation of php5-gd-5.2.10
         Re-installation of php5-extensions-1.3

Miroslav Lachman

More information about the freebsd-ports mailing list