libpacman: partial split of local and fdb functions into their own functions.