Simple package manager warner tool for distribution developers
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Go to file
Michal 6ba00bd218
ver bump AGAIN
2 years ago
src Fixed issue with arguments after package manager 2 years ago
.env Made the thing 2 years ago
.envrc Made the thing 2 years ago
.gitignore Made the thing 2 years ago
Cargo.lock ver bump AGAIN 2 years ago
Cargo.toml ver bump AGAIN 2 years ago
PKGBUILD ver bump AGAIN 2 years ago
README.md Made the thing 2 years ago
flake.lock Made the thing 2 years ago
flake.nix Made the thing 2 years ago
justfile Made the thing 2 years ago

README.md

Logo

Package Warner

License GitHub isses GitHub pull requests
Discord The maintainer of this repository
Mastodon Follow Twitter Follow

pkg-warner is a simple and configurable package warner tool for distribution packagers.

Configuration

pkg-warner is configured at build time using three environment variables:

  • PKG_WARNER_PACKAGES: a comma-separated list of incorrect package managers to warn about.
  • PKG_WARNER_DISTRO: the distribution name to use in the warning.
  • PKG_WARNER_PMAN: the correct package manager name to use in the warning.

Then, in the packaging process you can run pkg-warner -id "${dest_dir}" to copy itself to ${dest_dir}/<each value in PKG_WARNER_PACKAGES> under the destination directory. (e.g., ./pkg/usr/bin/apt)

If no -d/--dest-dir id provided, it'll install to /usr/bin by default.

If you want an example of how to adapt this to your own distribution/packaging process, see the provided PKGBUILD

How to build:

Tested on latest Cargo (1.60.0-nightly)

Debug/development builds

  • cargo build

Optimised/release builds

  • cargo build --release