Package Details: perl6-file-find 0.1-4

Git Clone URL: https://aur.archlinux.org/perl6-file-find.git (read-only)
Package Base: perl6-file-find
Description: File::Find for Perl 6
Upstream URL: https://github.com/tadzik/File-Find
Licenses: MIT
Groups: perl6
Submitter: atweiden
Maintainer: atweiden
Last Packager: atweiden
Votes: 1
Popularity: 0.000017
First Submitted: 2015-11-23 02:43
Last Updated: 2017-08-07 02:04

Dependencies (3)

Sources (1)

Latest Comments

rafalp commented on 2016-02-27 00:38

I still had the same problem with "Removing redundant precomp file dependencies...". I checked what's going on and on my machine it fails on the line:

_precomp=($(pacman -Qqg perl6 | pacman -Qql - | grep precomp))

Here's what I get out of the `pacman -Qqg perl6 | pacman -Qql -`:

/usr/
/usr/bin/
/usr/bin/alacryd
/usr/share/
/usr/share/doc/
/usr/share/doc/alacryd/
/usr/share/doc/alacryd/README.md
/usr/share/licenses/
/usr/share/licenses/alacryd/
/usr/share/licenses/alacryd/UNLICENSE

There's no "precomp" so I guess `grep precomp` fails (returns non 0) and thus the whole build process aborts with an error.

Well, I'm not a bash expert but I found that it has something to do with `set -e` and you can avoid aborting a script on a cmd error by appending `|| true` to it like this:

_precomp=($(pacman -Qqg perl6 | pacman -Qql - | grep precomp || true))

For me it worked, and finally with this small modification I can build and install this package.

spider-mario commented on 2016-02-22 23:18

> If it finds any of those files in $pkgdir, it will delete them.

My concern was that I thought that this was actually not what the code expressed. I thought that the file not being found in $pkgdir would cause the script to fail because of [[ ]] returning false, but apparently I was wrong: lines that involve && do not cause an ERR signal, even when they return false (unlike the grep issue earlier).

atweiden commented on 2016-02-22 22:59

> What I mean is that for every precomp file found in the packages of the perl6 group, it will try to find the same file in $pkgdir: if it is not present, then [[ -f … ]] will return false, and the whole line will fail. Or am I misunderstanding the code?

That's the intended behavior, yes. It checks for precomp files installed to the system. If it finds any of those files in $pkgdir, it will delete them. If you have a more efficient approach, I'd like to hear it.

> If that is the case, it means that the PKGBUILD expects all precomp files already installed on the system to be replicated in $pkgdir. Is that really what happens?

Well, not all of them will be replicated. But some of them are replicated. My precomp removal code arose as a necessary but ugly hack after installing 10 or so p6 modules with Pacman. I don't know of a better way to avoid redundantly precompiling as of today. If some action isn't taken in the PKGBUILD to remove those files, file conflicts will arise during installation.

spider-mario commented on 2016-02-22 22:21

What I mean is that for every precomp file found in the packages of the perl6 group, it will try to find the same file in $pkgdir: if it is not present, then [[ -f … ]] will return false, and the whole line will fail. Or am I misunderstanding the code?

If that is the case, it means that the PKGBUILD expects all precomp files already installed on the system to be replicated in $pkgdir. Is that really what happens?

atweiden commented on 2016-02-22 21:29

My bad. @spider-mario you are correct that grep could have returned || true to fix the issue. I can probably improve the precomp removal step with your code.

> Also, I have the impression that this line:
> [[ -f "$pkgdir/$_pc" ]] && rm -f "$pkgdir/$_pc"
>
> forces the precomp files in perl6-file-find to be a superset of those of the packages already installed. Why would that be the case? It might be best to replace this use of && with a “proper” if.

Not sure what is meant by this. Care to provide a code example? The point of doing precomp removal is to prevent conflicting files on disk.

spider-mario commented on 2016-02-22 19:27

I will add rakudo to the perl6 group because it makes sense on its own, but is this really the right way of fixing this?

Why is this step even necessary? are there really precomp files that collide between the two packages? My impression is that with rakudo not in the perl6 group, it only fails because of the final grep not returning anything, so it could probably be fixed by adding `|| true` after the call to grep.

In any case:
pacman -Qg perl6 | awk '{print $2}' | xargs pacman -Ql | awk '{print $2}'
could be simplified to:
pacman -Qqg perl6 | pacman -Qql -

Also, I have the impression that this line:
[[ -f "$pkgdir/$_pc" ]] && rm -f "$pkgdir/$_pc"

forces the precomp files in perl6-file-find to be a superset of those of the packages already installed. Why would that be the case? It might be best to replace this use of && with a “proper” if.

trizen commented on 2016-02-22 18:30

Thanks atweiden. I notified the maintainer of rakudo.

atweiden commented on 2016-02-22 18:24

Precomp removal step is still necessary. The solution is for the the other maintainer to add rakudo pkg to group=('perl6').

atweiden commented on 2016-02-22 17:54

The rakudo pkg (https://aur.archlinux.org/packages/rakudo) isn't in group=('perl6'). That's probably why the precomp removal step is failing. I don't maintain the other rakudo package, but maybe the maintainer can add rakudo to the perl6 group.

It's also possible that the precomp removal step could be obsolete in PKGBUILDs due to changes in rakudo upstream. Will test that today.

rafalp commented on 2016-02-17 12:00

I'm also on x86_64. I have installed rakudo (not rakudo-git). perl6 -v yields:

This is Rakudo version 2016.01 built on MoarVM version 2016.01 implementing Perl 6.c.

All comments