Fix pkgdb_repo initialization.
Fix pkgdb_repo initialization.

Avoid some desctructive operation while opening pkgdb_repo. This
code was incorrectly imported from pkgdb code.

khorben/pkg,khorben/pkg,junovitch/pkg,en90/pkg,Open343/pkg,skoef/pkg,Open343/pkg,khorben/pkg,junovitch/pkg,skoef/pkg,en90/pkg