Fix port test when make fails (build,stage,check-orphans) and can't remove temporary pkgdb