Created attachment 647424 [details] repos.conf.tar.gz $ pkgcheck scan pkgcheck: error: repos.conf: default repo 'gentoo' is undefined or invalid emerge and repoman work fine
You don't have location set for gentoo. I suppose Portage works only because of some backwards compatibility hack.
It is set in /usr/share/portage/config/repos.conf [DEFAULT] main-repo = gentoo [gentoo] location = /usr/portage sync-type = rsync sync-uri = rsync://rsync.gentoo.org/gentoo-portage auto-sync = yes sync-rsync-verify-jobs = 1 sync-rsync-verify-metamanifest = yes sync-rsync-verify-max-age = 24 sync-openpgp-key-path = /usr/share/openpgp-keys/gentoo-release.asc sync-openpgp-keyserver = hkps://keys.gentoo.org sync-openpgp-key-refresh-retry-count = 40 sync-openpgp-key-refresh-retry-overall-timeout = 1200 sync-openpgp-key-refresh-retry-delay-exp-base = 2 sync-openpgp-key-refresh-retry-delay-max = 60 sync-openpgp-key-refresh-retry-delay-mult = 4 sync-webrsync-verify-signature = yes
pkgcore support for portage config parsing is compatible with basic settings from repos.conf, but won't go searching for it in /usr/share/portage. I'd advise using /etc/portage/repos.conf or submitting a convincing argument as to why pkgcore should go searching for it in other portage-centric locations.
I should also note pkgcheck doesn't even require running it on system with configured repos -- it doesn't even have to be a Gentoo system. However, this does require running it inside an ebuild repository, using the -r/--repo option, or similar.
Closing since this works fine as noted in comment #4 and some related issues were fixed in the most recent release. Note you should also report most runtime issues upstream unless they're directly related to the ebuilds.
See also https://wiki.gentoo.org/wiki/Pkgcheck#error:_repos.conf:_default_repo_.27gentoo.27_is_undefined_or_invalid.