Pakku - A Package Manager for
When she become a fully grown butterfly. currently
Pakku is at larva.0 version and growing. She can do basic stuff but still little clumsy!
Light as a
Pakku installs herself in a custom
CompUnit::Repository outside of
Raku's default repos.
git to be available in
git clone https://github.com/hythm7/Pakku.git cd Pakku # install to home directory ./hooks/install-pakku.raku # or to different destination # ./hooks/install-pakku.raku --dest=/path/to/pakku # if you prefer a ready to use distribution: # wget https://github.com/hythm7/Pakku/raw/master/distribution/Pakku-larva.0.txz # tar xf Pakku-larva.0.txz # Pakku location: .pakku/bin/pakku
- Add distribution
- Remove distribution
- List distribution
- Build distribution
- Test distribution
- Download distribution
Pakku is shy butterfly, she is a bug of little words, So every
Pakku command result will be one of:
Ofun- Desired operation completed successfully
Nofun- Desired operation did not complete successfully
All Good- Nothing to be done (eg. removing uninstalled distribution)
Of course unless
Pakku panicked and she doesn't know what to do, then you will be greeted with an
Pakku can be really talkative when need be. She suggests her new friends set the verbosity level to at least
info specially when adding a
Distribution with many dependencies or multiple
Distributions at once.
pakku add MyModule pakku add nodeps MyModule pakku add notest MyModule pakku add into /opt/MyApp MyModule pakku add force into home MyModule1 MyModule2 Options: deps → add dependencies nodeps → dont add dependencies deps requires → add required dependencies only deps recommends → add required and recommended dependencies deps only → add dependencies only build → build distribution nobuild → bypass build test → test distribution notest → bypass test force → force add distribution even if installed noforce → no force into <repo> → add distribution to repo <home site vendor core /path/to/MyApp>
pakku remove MyModule Options: from <repo> → remove distribution from provided repo only
pakku list pakku list MyModule pakku list local MyModule pakku list remote MyModule pakku list details MyModule pakku list repo home pakku list repo /opt/MyApp MyModule Options: local → list local remote → list remote details → list details repo <name> → list repo
pakku build MyModule pakku build .
pakku test MyModule pakku test ./MyModule
pakku update add MyModule pakku noupdate add MyModule pakku dont add MyModule pakku nopretty add MyModule pakku verbose trace add MyModule pakku pretty please remove MyModule Options: update → update ecosystem to get latest before adding distribution pretty → colorfull butterfly nopretty → no color dont → do everything but dont do it verbose <level> → verbose level <silent trace debug info warn error fatal> please → be nice to the butterfly, she will be nice to you (TBD)
Check distribution (download)
pakku check MyModule
pakku pakku add pakku help pakku help list pakku help help
Feeling Perlish Today?
Pakku commands and options can be written in shorter form, for example:
add → a update → u noupdate → nu silent → «S 0» remove → r pretty → p nopretty → np trace → «T 1» list → l deps → d nodeps → nd debug → «D 2» build → b force → f noforce → nf info → «I 3» test → t verbose → v details → d warn → «W 4» check → c local → l local → l error → «E 5» help → h remote → r remote → r fatal → «F 6»
So this is a valid
pakku nu vD a f nt MyModule
Did I mention that the below are
Pakku commands as well?
pakku 𝛒 ⟳ ↓ 🔗 🔨 MyModule pakku 👓 🦋 ↑ MyModule pakku ↪ 🌎 pakku ❓
Can you guess what they do? A full list is here,You can add you favourite ones too if you like.
All options can be set in command line or in the config file pakku.cnf in installtion dir. Config file example is provided below:
### Pakku Config # <pakku> # update # update ecosystem # pretty # colors # verbose info # < 0 1 2 3 4 5 6 > # dont # dont do it (dry run) # # <add> # deps # add deps as well < deps nodeps only requires recommends > # build # build < build nobuild > # test # test < test notest > # force # force install < force noforce > # into home # install into specific repo # # <remove> # from home # remove from specific repo # # <list> # local # local dists # remote # remote dists # details # list details # # custom Log colors, also override unicode # if symbols not showing # <log> # trace name T: # debug name D: # info name I: # warn name W: # error name E: # fatal name F: # # trace color reset # debug color green # info color blue # warn color yellow # error color magenta # fatal color red # Add your own source provided it contains # a valid list of distributions meta files <source> https://raw.githubusercontent.com/hythm7/raku-ecosystem/master/resources/ecosystem.json
Pakku ecosystem source is a github file that contains available modules in
cpan. Its LTA, slow and doesn't scale well (needs to download the file and parse it).
Ideally there need to be an online Recommendation Manager service which can be used by
Raku's package managers to send a request for a
Distribution and get back
json contains the
META along with it's dependencies.
Working on such online Recommendation Manager will take time and I wanted to release
Pakku sooner. I might work on such Recommendation Manager after
Pakku becomes little more stable.
%?RESOURCESis not available inside a custom repo during the testing phase, might cause test failure for some modules, see here for more info. as temporary workaround you can bypass tests if it failed in custom repo installation.
There is version of
File::Directory::Tree:ver<0.000.001>in the ecosystem it's
source-urlpoints to a different version
File::Directory::Tree:ver<*>, This causes an issue for
File::Directory::Tree:ver<*>is already installed, first
Pakkuwill see a different version, but when get
source-urland start installing an error will be thrown that this version is already installed. as a temp workaround use
- Write more tests
- Fix bugs
- Redo things if a better way revealed to me
- Improve the performance to live up to the motto
Pakku Works on GNU/Linux, Unfortunately I don't have access to Windows or Mac machine to test and make it compatible with different Operating Systems. However, PRs are very welcome :)
also Thanks for the nice
elganiny.haytham at gmail.com
COPYRIGHT AND LICENSE
Copyright 2019 Haytham Elganiny
This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.