On Wed, 2005-03-30 at 15:20 +0200, Tobias Kieslich wrote:
> On Wed, 30 Mar 2005 13:57:37 +0200
> J�rgen H�tzel <[EMAIL PROTECTED]> wrote:
> > Wouldn't it be nice to predefine the build function. Many packages
> > just copy the predefined build function. This would reduce code
> > duplication. Here's a patch.
> >
> > The gentoo guys also split the packaging process into
> > src_{unpack,compile,install}. When the build function in arch is
> > splited up and predefined this could allow further reduction of code
> > duplication.
> >
> There are also a lot of packages that, not only copy the generic function -
> instead they sed/patch code, source config files, export paths etc.
>
> To introduce predefined functions would produce some kind of our own
> scripting (wrapper) language where bash/shell does the job much better,
> since you will to have define new subroutines for the tweaks. Or you mix
> up your own function with shell commands, and this is IMHO very "dirty"
I think you've misunderstood the proposal/patch; all it means is that if
the pkgbuild script doesn't define a build() function then the default
one would be used.
Personally, I think every pkgbuild script that I've written has had a
changed build() function, so I'm not sure that this would make much
difference.
But I would be in favour of splitting out a lot of the existing makepkg
script into functions that could be overridden in the pkgbuild script if
required - being able to replace the default fetch/unpack method would
be useful.
Maybe I'll write a patch for this next time I need it :)
- olly
_______________________________________________
arch mailing list
[email protected]
http://www.archlinux.org/mailman/listinfo/arch