Zirak / pkgfs

1 stars 0 forks source link

NAME

pkg - package handling pseudo-filesystem

DESCRIPTION

The pkg filesystem is a pseudo-filesystem which provides an interface to package management. Its goal is to provide a unified abstraction over package management which is easy to use, for humans and programs alike. Packages can be listed, installed, deleted, upgraded, introspected, and so forth using just the filesystem.

MOUNT OPTIONS

¯\(°_o)/¯

Files and directories

Files and directories found under the mount path, assumed to be /pkg/.

Root directory

Package files and directories

Files and directories found under both /pkg/index/[name] and /pkg/installed/[name].

Index package files and directories

Files and directories found only under /pkg/index/[name]

Installed package files and directories

Files and directories found only under /pkg/installed/[name]

/pkg/installed/zsh/files:
etc
usr

/pkg/installed/zsh/files/etc:
zsh

/pkg/installed/zsh/files/etc/zsh:
zprofile -> /etc/zsh/zprofile

/pkg/installed/zsh/files/usr:
bin
lib
share

/pkg/installed/zsh/files/usr/bin:
zsh -> /usr/bin/zsh
zsh-5.0.8 -> /usr/bin/zsh-5.0.8

...

TODOs

Root directory

  1. dpkg/apt separate between a regular upgrade and a distro-upgrade; which one should /pkg/upgrade run? Is there an equivalent separation in other managers?
  2. outdated/ directory: Spec it. Some suggestions below. To decide which is the better way, some research is needed to find out whether upgrading a package is the same as installing the new version, cross package manager. Anyway, suggestions:
    1. Symlinks to /pkg/index
    2. Directory with two symlinks, one to the installed package and the other to the index, with an executable to upgrade.
  3. orphans/ directory: Spec it. How should it look like? Should it contain a clean-orphans script? Possible name clashes an iteration problems?

Installed directory

  1. Find out if files/ can be implemented across all package managers.

Implementations

Based off of an older google doc file before it grew too unwieldy.