[pacman-dev] About makepkg dlagents

Xavier shiningxc at gmail.com
Mon Oct 26 10:15:41 EDT 2009

On Mon, Oct 26, 2009 at 3:03 PM, Ciprian Dorin, Craciun
<ciprian.craciun at gmail.com> wrote:
>    So based on what I've seen a build system has the following
> responsabilities:
>    * compile-time dependency checking; (like ./configure does, but
> without the actual configuration;)
>    * build environment preparation; (this includes downloading needed
> source code, checking it, patching, etc.;)
>    * configuring the build according to the package specification;
> (invoking ./configure;)
>    * building the package; (make;)
>    * creating a deployable package;
>    Now getting back with the problem where we want to reduce the
> snipet of code you've highlighted. We can see that the purpose of that
> code is to "prepare the build environment", more exactly fetching the
> source code, but we are forced to showell it inside the "build stage"
> function.
>    So the reason why I've created the patch is because I want to
> tread source code comming from Git just like any other source-code
> bundle, without beeing forced to put it inside the build function.

That's a very good point, and an idea which has been floating for a
while would be to introduce a prepare() function.

I think this is actually a requirement for makepkg -e to work in many
cases, where patches are applied or a scm is used.

Then, for limiting code duplication, we could use another idea which
has been floating for a while : library functions.

Just an example of how this could work :

prepare() {
source $libdir/scm
gitprepare $_gitroot $_gitname

More information about the pacman-dev mailing list