The missing 'version' file looks to be the issue, and explains why zef worked 
when installing under under 'site' but not 'vendor': during my testing I think 
I managed to delete the version file from vendor...

Oops. That means I've created a load of noise (but hopefully someone might 
benefit from it down the line...).

This isn't related to the PKGBUILD file itself (where version was being 
deleted); that's a chroot/shadow dir so the removal would be to prevent a file 
conflict, not directly affect files on the filesystem. However, 
'install-dist.pl' takes care of that so the section isn't  needed anyway.

Thank you for looking into this. :)


On Sat, 05 Aug 2017 07:12:17 -0700, n...@detonation.org wrote:
> 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
> 
> 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

Reply via email to