[perl #131831] Possible precomp issue: crash with `is a directory, cannot do '.open' on a directory` pointing to a sha1 hash of a dir
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
[perl #131831] Possible precomp issue: crash with `is a directory, cannot do '.open' on a directory` pointing to a sha1 hash of a dir
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
[perl #131831] Possible precomp issue: crash with `is a directory, cannot do '.open' on a directory` pointing to a sha1 hash of a dir
# New Ticket Created by Zoffix Znet # Please include the string: [perl #131831] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=131831 > The full issue and some discussion can be seen on zef's Issue https://github.com/ugexe/zef/issues/190 After working around --ll-exception, we managed to dump full stack trace. It points to this line in CURI https://github.com/rakudo/rakudo/blob/7599e0c3ffb2c7ef29c2994c7d212360459f14fe/src/core/CompUnit/Repository/Installation.pm#L424 It's checking for `.e` but probably should be checking for `.f`. I'm not sure if that's all to the issue (probably not) and perhaps someone more familiar with the codebase would know WHY the $lookup ends up being a directory instead of the expected file: $ cd $(mktemp -d); mkdir Exceptions; echo 'class Exceptions::Foo { method process ($e) { say "$e.message() $e.backtrace.full()"; False } }' > Exceptions/Foo.pm6; RAKUDO_EXCEPTIONS_HANDLER=Foo perl6 -I. -MExceptions::Foo /usr/share/perl6/vendor/bin/zef '/usr/share/perl6/vendor/short/34674DE0B49051C42E89F10D51FE788C3C3A3816' is a directory, cannot do '.open' on a directory in method throw at SETTING::src/core/Exception.pm line 57 in block at SETTING::src/core/CompUnit/Loader.pm line 25 in block at SETTING::src/core/CompUnit/Loader.pm line 23 in any at /usr/share/perl6/runtime/CORE.setting.moarvm line 1 in method throw at SETTING::src/core/Exception.pm line 54 in method throw at SETTING::src/core/Failure.pm line 44 in method Str at SETTING::src/core/Failure.pm line 85 in method lines at SETTING::src/core/Cool.pm line 169 in method lines at SETTING::src/core/IO/Path.pm line 629 in block at SETTING::src/core/CompUnit/Repository/Installation.pm line 425 in block at SETTING::src/core/CompUnit/Repository/Installation.pm line 424 in method matching-dist at SETTING::src/core/CompUnit/Repository/Installation.pm line 421 in method need at SETTING::src/core/CompUnit/Repository/Installation.pm line 503 in method need at SETTING::src/core/CompUnit/Repository/Installation.pm line 543 in method need at SETTING::src/core/CompUnit/Repository/Installation.pm line 543 in method need at SETTING::src/core/CompUnit/Repository/FileSystem.pm line 148 in any load_module at src/Perl6/World.nqp line 1218 in any do_pragma_or_load_module at src/Perl6/World.nqp line 1148 in any statement_control:sym at src/Perl6/Grammar.nqp line 1640 in any statement_control at /usr/share/nqp/lib/Perl6/Grammar.moarvm line 1 in any statement at src/Perl6/Grammar.nqp line 1292