Dan McGee wrote: > There is rarely a reason to ever not set up the local DB when getting a > libalpm handle, so just do it automatically at this time. It is still a lazy > initialization anyway, so there should be little to no fallout from doing > it this way.
I'm concerned about the uncertainty of "little to no fallout". What exactly does the "lazy" initialization do? Does it in any way rely on the presence of a local database? I ask because I have a tool in mind that will use ALPM to query the sync database, most likely in the absence of a local database. It also strikes me as bad design to hard-code something that is not necessary for all operations, especially for a library that is at least intended for use beyond Pacman. Wouldn't it make more sense to create a separate routine to automatically set up the local DB when getting a libalpm handle? Applications that need the local DB could just use that instead wherever they acquire the handle.
