hythm7 / Pakku

Package Manager for the Raku Programming Language
Artistic License 2.0
26 stars 3 forks source link

pakku fails to install - permissions issue #28

Closed melezhik closed 1 year ago

melezhik commented 1 year ago

pakku add noprecomp notest . command fails with :

Failed to create directory '/opt/rakudo-pkg/share/perl6/site/short/33B4E39DF2AD744C6ADDCA01718E4F52AF6E983C' with mode '0o777': Failed to mkdir: Permission denied

Looks like pakku tries to install to '/opt/rakudo-pkg/ instead of ~/.raku ?

full report - https://ci.sparrowhub.io/report/2696

hythm7 commented 1 year ago

The default repo Pakku installs to is the site repo, so the user running pakku needs to have write access to it. If need to install to home repo (~/.raku) you can add to home to the command. pakku add to home Foo

melezhik commented 1 year ago

yeah, this was my assumption, just wanted to check here. zef installs to home by default . maybe for user installation this default is more convenient ?

hythm7 commented 1 year ago

Actually home was the default repo for installation in the previous version of Pakku, but I changed it to site in this version because IIRC some chat on IRC mentioned that site is the safest option especially when having multiple rakudo versions installed. if there is consensus from Raku core developers that home should be the default repo for installation, I will change it.

In the mean time one can create a config file in ~/.pakku/pakku.conf and copy the example config file from the Configuration section in the README, then: 1- uncomment the line # < add > # activate the configurations for add command 2- uncomment the line # to home # to override the default repo from site to home

with this change in the configuration there will be no need to specify to home in the command and pakku add Foo will install to home repo.

melezhik commented 1 year ago

thanks!

hythm7 commented 1 year ago

fwiw ccd3a1096a0d1e9d9bbf78140fb6e85fead56085 will make sure the requested repo can-install dists, if can not then the first repo in the repo-chain that can-install will be used.