[PATCH v2 04/10] pakfire: Replace dbgetlist duplicate code