smart pkgname lookup