On Thu, Aug 14, 2008 at 9:45 PM, Henning Garus <henning.garus@googlemail.com> wrote:
1) Is one build function enough? In an older thread someone (Aaron I think) talked about building packages with different configurations from one packagebuild. I am not sure you can do this with one build function. What you could do, is using the package functions to do this, this would go against the "minimal fakeroot usage" thing, but is probably sufficent for something rather uncommon. An alternative would be, checking for build_pkgname functions and calling them if they are defined.
In my opinion, it is "sufficient for something rather uncommon". And in the normal usage with one build function and several package functions, the fakeroot usage would already be less than now since the build function does not need it. But I find the build_pkgname idea decent, so no strong opinion on my part. And anyway, it will be up to the people implementing it :)
2) This is a bit implementation specific, but I think it is important. Is there any way, except parsing the PKGBUILD file, to get the contents of all depends arrays, to check the depends before building the package? If not, overriding depends could be problematic.
That is important indeed and I never thought about it. But finally it looks fine. You have the main depends array that is used for the build() function, which is checked before building the package. So there, you put all dependencies required for building. And then, each package is free to override it, probably for only having a subset of the original depends array.