Skip to content

A Rust library to parse and search the Gentoo Linux Portage Package Manager eix database format.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

Komplix/eix-lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eix

github crates.io Build maintenance-status

A Rust library to parse and search the Gentoo Linux Portage Package Manager eix database format.

Usage

use eix::{Database, PackageReader};

fn main() -> std::io::Result<()> {
    let mut db = Database::open_read("/var/cache/eix/portage.eix")?;
    let header = db.read_header(0)?;
    let mut reader = PackageReader::new(db, header);

    while reader.next_category()? {
        let category = reader.current_category();
        while let Some(pkg) = reader.read_package()? {
            println!("{}/{}: {}", category, pkg.name, pkg.description);
        }
    }
    Ok(())
}

Examples

eix2json

The library includes an example tool eix2json that converts an eix database to JSON format.

cargo run --example eix2json -- /var/cache/eix/portage.eix output.json

If no output file is specified, it will output to stdout.

eix_version_masks

The example eix_version_masks displays all versions of each package along with their mask flags and other metadata.

cargo run --example eix_version_masks -- /var/cache/eix/portage.eix

License

Licensed under either of

at your option.

About

A Rust library to parse and search the Gentoo Linux Portage Package Manager eix database format.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages