| Crates.io | vardbpkg |
| lib.rs | vardbpkg |
| version | 0.2.0 |
| created_at | 2026-01-13 17:00:14.668636+00 |
| updated_at | 2026-01-20 14:23:18.546687+00 |
| description | Library for handling the Portage Installed Packet Database of Gentoo Linux |
| homepage | |
| repository | https://github.com/Komplix/vardbpkg-lib |
| max_upload_size | |
| id | 2040626 |
| size | 119,163 |
A Rust library to parse and search the Gentoo Linux Portage Package installed database /var/db/pkg.
use vardbpkg::parse_vardb;
use std::path::Path;
fn main() {
let packages = parse_vardb(Path::new("/var/db/pkg"));
for pkg in packages {
println!("{}/{}: {}", pkg.category, pkg.package, pkg.description);
}
}
The library includes an example tool vardbpkg2json that converts the Portage database to JSON format.
cargo run --example vardbpkg2json -- /var/db/pkg
If no directory is specified, it defaults to /var/db/pkg.
Licensed under either of
at your option.