2
0
mirror of https://codeberg.org/kiss-community/repo synced 2024-12-21 14:50:07 -07:00
Go to file
2019-05-09 11:05:09 +03:00
repo/zlib new package manager experiment 2019-05-09 09:47:08 +03:00
.gitignore new package manager experiment 2019-05-09 09:46:50 +03:00
puke new package manager experiment 2019-05-09 09:46:50 +03:00
README.md docs: update 2019-05-09 11:05:09 +03:00

KISS Package Experiment.

This is an alternative package system I am experimenting with. Instead of the usual PKGBUILD, APKBUILD, xbps-template and Pkgfile format, this repository explores a more unixy approach.

Each Package is split into multiple files.

zlib/            # Package name.
├─ build         # Build script.
├─ depends       # Dependencies (one per line).
├─ sources       # Sources (one per line).
├─ version       # Package version.# Files generated by the package manager.
├─ manifest      # The built package's files and directories.
├─ checksums     # The checksums for the source files.# Optional files.
├─ post_install  # The script to run after install.
├─ release       # Force a package update for the same version.

When a built package is installed, this entire directory tree is copied to /var/db/puke where it becomes a database entry. Listing the dependencies for a package is a simple as printing the contents of the depends file. Searching for which package owns a file is as simple as checking each manifest file.

This new structure also allows the package manager to be stupid simple. POSIX sh has no arrays. However, they are mimicked by looping over each line of each file. No more insecure depends="pkg pkg pkg" and for pkg in $depends.

Instead, the following can be done.

while read -r depend; do
    # do thing.
done < depends