diff --git a/README.md b/README.md index 79e5e85..6be6e83 100644 --- a/README.md +++ b/README.md @@ -3,24 +3,25 @@ [![Go](https://img.shields.io/badge/go-≥1.21-blue?logo=go)](https://go.dev/) [![License: MPL-2.0](https://img.shields.io/badge/License-MPL_2.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0) [![Build Status](https://img.shields.io/badge/build-passing-brightgreen)](#) -A *nicely-ish vibecoded* package manager that uses **apk** repos. +A *nicely-ish vibecoded* package manager that uses **apk** repos. Or a crappy version of ``apk`` > ⚠ **Warning:** -> Do **NOT** uninstall system packages unless you *really* know what you're doing — +> Do **NOT** uninstall packages unless you *really* know what you're doing — > otherwise you’ll probably end up with a broken system! (it's kinda crappy) --- > **Note:** -> The dependency resolution is highly experimental and partially broken (don’t use it!) +> The dependency resolution is highly experimental and partially broken (don’t use it! `maybe`) --- ## Building -1. Clone the repo -2. Install Go -3. Run: +1. Clone the repo +2. CD into the directory +3. Install Go +4. Run: ```bash go build . @@ -33,7 +34,7 @@ CGO_ENABLED=0 go build -ldflags="-s -w -extldflags '-static'" -o apkg ``` ## Configuration -* Configuration is written in YAML. +* Configuration is written in YAML, the file must be called `apkg.yaml`, and either be in the working directory, with the binary or specified with the `-config` flag You can have one or more repositories (only works with apk v2, not apk v3): ```yaml @@ -77,7 +78,43 @@ apkg help # Print this help message Flags: -config Path to config file (default: apkg.yaml) --dry-run Show what would be done, but don't modify anything +-dry-run Show what would be done, but doesen't modify anything 🔴 IS BROKEN AND DOES MODIFY, DO NOT TRUST 🔴 -v Enable verbose output -h, --help Print a shorter version of this help message ``` +Installed packages are automatically indexed in a file called `installed.yaml` after being installed, it will look something like this: + +``installed.yaml`` +```yaml +- name: busybox + version: 1.37.0-r19 +- name: uutils-coreutils + version: 0.1.0-r0 +``` + +## Indexing & Uninstallation ⚠*WIP*⚠ + +At install time packages are indexed, with the files that that package contains being put in a folder called installed_files, in the same directory as the binary, it contains the files of each package in yaml format e.g.: +``busybox.yaml`` +```yaml +- bin/busybox +- etc/busybox-paths.d/busybox +- etc/logrotate.d/acpid +- etc/network/if-up.d/dad +- etc/securetty +- etc/udhcpc/udhcpc.conf +- usr/share/udhcpc/default.script +``` +or +``htop.yaml`` +```yaml +- usr/bin/htop +- usr/share/applications/htop.desktop +- usr/share/icons/hicolor/128x128/apps/htop.png +- usr/share/icons/hicolor/scalable/apps/htop.svg +``` +--- + +Packages can be reindexed by running ```apkg regen-indexes```, if you for example, delete the folder. + +The indexing is necessary due to the improper nature of this tool's uninstall mechanism, which just deletes every file that it indexed for that package, when it is uninstalled `Currently it doesen't delete the folders but this will be fixed soon™`