pkg - package handling pseudo-filesystem
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.
¯\(°_o)/¯
Files and directories found under the mount path, assumed to be /pkg/
.
index/
All packages available on the remote repository.installed/
Directory containing all installed packages.oudated/
Contains packages which can be upgraded. Currently unspecified.sync
Executable which synchronises the local package repository with the remote one (thinkapt-get update
orpacman -Sy
)upgrade
Executable which does a full system upgrade (thinkapt-get upgrade
orpacman -Su
)
Files and directories found under both /pkg/index/[name]
and /pkg/installed/[name]
.
name
description
size
Note that this is the installed size - how much disk space (in bytes) the package occupies/will occupy.dependencies/
A directory of relative symlinks to the package's dependencies. For example, iffoobin
depends onlibfoo
, this directory will contain a single symlink pointing to../../libfoo
, thus pointing to/pkg/(index|installed)/libfoo
.
Files and directories found only under /pkg/index/[name]
install
Executable which installs the package. Flags:-y
,--yes
- Automatic "yes" to prompts, unless asked a potentially destructive question (like conflict resolution).
Files and directories found only under /pkg/installed/[name]
-
uninstall
Executable which uninstalls the package. -
files/
A directory of the package's files which it created in the directory tree. Each leaf is a symlink to the actual file. For example:
/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
...
- dpkg/apt separate between a regular
upgrade
and adistro-upgrade
; which one should/pkg/upgrade
run? Is there an equivalent separation in other managers? 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:- Symlinks to
/pkg/index
- Directory with two symlinks, one to the installed package and the other to the index, with an executable to upgrade.
- Symlinks to
orphans/
directory: Spec it. How should it look like? Should it contain aclean-orphans
script? Possible name clashes an iteration problems?
- Find out if
files/
can be implemented across all package managers.
Based off of an older google doc file before it grew too unwieldy.