hmm
would a #plan9 package manager be a good idea? π€
it sure doesn't need one now but... if there was more software for it???
@enkiv2 I think so. If it's anything like pacman it would need to be a proper union file system (which afaik Plan 9's is not) and it would probably need some caching to make lookups faster.
So you could maybe do something like
% echo 'require lua-5.2' >> /srv/packagefs
and a subsequent
% /bin/lua
would find the relevant version
it's like #guix and #nix except you have to do less fighting against the OS
@enkiv2 Because for packages you want dependencies to also be loaded. It can be implemented with a union fs underneath, but it's better if you have a service that knows about packaging and can do dependency resolution and cleanup.
(but not installation/deletion, that should be left to a separate command line utility)
@grainloom @enkiv2 just ln -s to it.
@grainloom @enkiv2 use the equivalent of symlinks.
@enkiv2 @grainloom (packages in the package manager should use the absolute path /pacman/packagename/filename, you only link them for convenience reasons)
@grainloom @enkiv2 and then rely on the standard OS cache, and add offline mode support if you want
@grainloom @enkiv2 oh for when you accidentally stick a knife across the ethernet cables
@grainloom @enkiv2 As I understand Plan 9's mount semantics, why *wouldn't* it be a union filesystem?
@grainloom @enkiv2 I see what you mean; this quote:
""""
After the command
% bind -b b a # binds b on top of a
aaa.txt will be not be visible.
"""
explains everything nicely. Thanks!
@enkiv2 @grainloom how do you define 'subsequent'? does package installation race with program execution?
@martensitingale @enkiv2 I mean, probably... but the echo will block until the package is mounted and afaik #Plan9 file servers usually use coroutines, so there shouldn't be a situation where one thread is still registering the packages and the other is trying to serve it to a client.
@enkiv2 @martensitingale
And if the package handling service is separate from the union file system service then you don't even have to worry about dependency resolution blocking your file server.
@grainloom Why not just have a union filesystem that essentially contains all possible version of all possible packages (autovivified when first read or executed)?