[pacman-dev] [patch] add support for scriptlets functions embedded in $BUILDSCRIPT

Dan McGee dpmcgee at gmail.com
Mon Feb 25 08:11:55 EST 2008


On Mon, Feb 25, 2008 at 6:57 AM, Roman Kyrylych
<roman.kyrylych at gmail.com> wrote:
> 2008/1/24, Alessio Bolognino <themolok.ml at gmail.com>:
>
>
> > I'm who wrote the patch, so I think I should protect my baby a little bit, even
>  >  if I am not an strong supporter of it:
>  >
>  >  On Wed 2008-01-23 17:45 , Dan McGee wrote:
>  >  > [...]
>  >
>  > > I'm going to be the hardass here and first ask which patch we are
>  >  > considering above. The global variables thing worries me a bit.
>  >
>  >
>  > Global variables work 90% of time, they don't work if you mess with them too
>  >  much (and it's documented)
>  >
>  >
>  >  > I feel like the advantages of having it in a second file, which is
>  >  > copied directly to the package, outweighs the benefits. Notice that
>  >  > with the above method, zero comments are copied over as well.
>  >
>  >
>  > True, but usually people look at the source PKGBUILD, not at
>  >  /var/lib/pacman/wherever/is/the/post-install
>  >

*** My Comments ***
>  >  > This could confuse people. I already mentioned the global variables thing
>  >  > as a drawback, in addition to using subfunctions (see the
>  >  > pacman.install file). It isn't that these couldn't be solved by simply
>  >  > sticking with an external install file, but the confusion of educating
>  >  > users then comes into play. "Hey, you can put install functions in
>  >  > your PKGBUILD, but ONLY if they don't use variables, you don't mind
>  >  > missing comments, you don't try to actually use subfunctions to clean
>  >  > up the code...".
>  >  >
>  >  > Maybe I'm just being a stickler here, but it seems like what we have
>  >  > now works quite well, at the expense of needing one extra file. It
>  >  > also *clearly* seperates build-time operations from install-time ones,
>  >  > which I can see being quite confusing to first-time PKGBUILD writers.
>  >
>  >
>  > I agree that an external file is more straightforward, but as you said, the
>  >  patch only adds a feature, it's fully backward compatible.
>  >
>  >  I wrote this mail also to say that I'm not going to develop this patch anymore,
>  >  so if it doesn't apply or makes your systems explode, don't ask me to fix it
>  >  because I don't have time/will to do it.
>  >
>
>  Trying to resurrect this...
>  Dan, can this be merged for 3.2?

My comments above still apply, and I never heard great responses to
them. I've marked them for you, and I'd be hard-pressed to just merge
something because its been sitting around for a while.

-Dan




More information about the pacman-dev mailing list