[pacman-dev] Non-reentrancy of libalpm, why?

Aaron Griffin aaronmgriffin at gmail.com
Sun Feb 15 15:56:08 EST 2009


On Sun, Feb 15, 2009 at 3:05 AM, Patrick Walton <pcwalton at cs.ucla.edu> wrote:
> Hi,
>
> I noticed that libalpm isn't reentrant/thread-safe, even though it defines
> pmhandle_t to store all global information instead of using multiple global
> variables. This is unfortunate for my use case. I'm thinking about writing a
> cross-compiling makepkg-like utility, which would need to access two package
> handles simultaneously at once: that of the host and that of the target.
>
> Is there a reason why libalpm isn't reentrant? And how frozen is the libalpm
> API supposed to be?

No reason - we haven't had a need for it as multithreading is largely
useless when you're installing files to a filesystem. Feel free to
send patches for this though. As with most open source, things will
get implemented by those that care


More information about the pacman-dev mailing list