push db struct ito db_read_pkg
move likely_pkg into db struct

Finally kill the global.
push db struct into load_pkg_for_entry

Now likely_pkg is entirely an implementation detail of that function.
better error handling