The .e there is absolutely correct as depending on the repository format
version $lookup may be a file or directory. We switched to a directory with
version 1. So the .f will fail on a current repo version which explains the
failure in install-core-dist.pl

Advertising

The real question is not why $lookup ends up being a directory (that's the
normal case) but why we don't detect that we are dealing with a version 2 repo.
The PKGBUILD script posted on https://github.com/ugexe/zef/issues/190 gives the
answer to that:
rm -f "$pkgdir/usr/share/perl6/vendor/version"
Of course, by deleting that file, you rob rakudo of a vital piece of
information. Without that it runs on the wrong assumption that it's dealing
with a version 0 repository and that $lookup must be a file.
There's really nothing we could or should do here. As much as I'd like us to
throw a more useful error message here, that's simply not possible without
slowing down all normal uses. And trying to make rakudo resilient against
random files missing sounds like an uphill battle.
Please just remove the offending lines from the script. This, too looks highly
suspicious:
msg2 'Removing redundant precomp file dependencies...'
_precomp=($(pacman -Qqg perl6 | grep -v zef | pacman -Qql - | grep -E
'dist|precomp' || true))
for _pc in "${_precomp[@]}"; do
[[ -f "$pkgdir/$_pc" ]] && rm -f "$pkgdir/$_pc"
done
Considering that the spec file for openSUSE does not delete anything, I suggest
starting with an absolute minimum of a build script. The install-dist.pl call
may be quite sufficient. openSUSE does have quite strict packaging guidelines,
too.
https://build.opensuse.org/package/view_file/devel:languages:perl6/perl6-Inline-Perl5/perl6-Inline-Perl5.spec?expand=1