Subject: Builk build vs. p5-Test-Harness
To: None <tech-pkg@NetBSD.org>
From: Krister Walfridsson <cato@df.lth.se>
List: tech-pkg
Date: 06/21/2004 13:16:04
The problem
-----------
The bulk build refuse to build some packages because it registers
spurious dependencies.

The problem stems from lines of the form:

   DEPENDS+= {perl{,-thread}>=5.8.3,p5-Test-Harness-[0-9]*}:../../devel/p5-Test-Harness

This makes the bulk build register ../../devel/p5-Test-Harness as a
dependency, even though it is the perl package that will be used in
the build.  This is normally not a problem, since the right thing
happens when the package is built.  But the bulk build does
recursively mark all depending packages as broken when a package
fails to build (which in the current pkgsrc gives us 51 failures
when devel/p5-Test-Harness fails to build...)


The proposed solution
---------------------
The current bulk build process of building a package is roughly as:

  for each dependency
    install dependency
  build
  if "build failed"
    mark packages depending on this package as broken

I suggest changing this to:

  for each dependency
    if "dependency is broken"
      fail
    install dependency
  build

This is somewhat tricker than what my pseudo code above indicates (for
example, we need to keep track of dependencies in the form as they are
written in the DEPENDS, rather than just the directories as they are now)
but I think this can be done with only minor changes to bsd.bulk-pkg.mk.

Comments?

   /Krister