Subject: Re: Builk build vs. p5-Test-Harness
To: Krister Walfridsson <cato@df.lth.se>
From: Alistair Crooks <agc@pkgsrc.org>
List: tech-pkg
Date: 06/22/2004 12:11:04
On Mon, Jun 21, 2004 at 01:16:04PM +0200, Krister Walfridsson wrote:
> 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...)
I think I made a suggestion of putting a level of indirection into the
mix - have a package which sits on top of p5-Test-Harness, which has a
DEPENDS of p5-Test-Harness if it's needed, but is a no-op if
p5-Test-Harness is not needed. This would work around the bulk build
problem. However, this is a workaround that (a) I haven't tested to
see if it would work, and (b) it's a workaround, and doesn't fix the
inherent problem.
> 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.
I'd be interested to know if your pseudo-code above works - can you elaborate
a bit more on the change in dependency tracking, please?
Thanks,
Alistair