[pacman-dev] [PATCH 6/6] makepkg: make built script sourceable
Allan McRae
allan at archlinux.org
Fri Aug 8 00:11:09 EDT 2014
On 08/08/14 09:22, Dave Reisner wrote:
> Aside from the hack at the foot of the script, this commit introduces no
> logical changes or new code. Any globally scoped declaration or code are
> moved into a 'makepkg_main' function which is called when the script is
> executed (not sourced).
>
> Doing this allows other scripts to source makepkg for its juicy
> functions, and also makes these functions more easily unit testable.
>
> This commit explicitly does NOT attempt to define an API or any other
> stability guarantees of any kind.
I am OK with this as an interim solution. Note that we have added the
ability to have makepkg split up into small independent files (which I
think is good for testing and reusability), so I'd like us to head that
way at some stage.
A
More information about the pacman-dev
mailing list