debuginfo-install: remove dead code and slightly refactor package name handling