Hi. I'm trying to create a macports portfile for zef so
that macports users can easily install zef using
macports. Currently, the only raku-related port on
macports is rakudo itself (and nqp). A zef port would
be a great next step. But I'm not a raku expert or a
macports expert, so I need help.

I did manage to get it to successfully test and install
and activate, but only once. When I then tried to
install using certain options (-vst) that show you
which assumptions you've made that won't be true for
others, I started getting an error. And the error never
went away even without -vst. I'm hoping someone here
might be able to explain what's happening.

In case anyone here uses macports and can test this
themselves, the broken portfile is at
https://github.com/macportsraf/raku-zef-portfile

The error is that it's failing to mkdir
/opt/local/share/perl6/site/short (Operation not
permitted). Currently, /opt/local/share/perl6/site only
contains "version". It shouldn't be placing anything
directly in /opt/local at this stage (the "destroot"
stage). It should be installing into a DESTDIR
location. The command used to install zef into the
destroot is:

  "${prefix}/bin/rakudo" -I"${worksrcpath}" bin/zef 
--to="inst#${destroot}${prefix}/share/perl6/site" install "${worksrcpath}"

which shouldn't be touching /opt/local. Nothing can
affect /opt/local (i.e. ${prefix}) until the port is
installed and activated). Installation is into a
version-specific directory, and activation of a
particular version copies files from that directory
to the official "prefix" (usually /opt/local).
the "destroot" phase happens before all of that
into a temporary directory.

Perhaps rakudo is doing some housekeeping in addition
to what zef is trying to do to install itself? Does
anyone have any idea what might be causing this mkdir,
and is there anything I can do to suppress it?
Alternatively, if rakudo is creating directories that
it sees as missing, can I preempt that by triggering
those directories to be created earlier when rakudo
itself is installed, so that it doesn't feel the need
to do it when something else is being installed later?

cheers,
raf

Reply via email to