apt-pkg-native 0.3.0

Bindings for libapt-pkg
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
extern crate apt_pkg_native;
extern crate itertools;

use itertools::Itertools;

use apt_pkg_native::Cache;
use apt_pkg_native::simple;

fn main() {
    let mut cache = Cache::get_singleton();
    for item in cache.iter().map(simple::BinaryPackageVersions::new) {
        println!(
            "{} [{}]",
            item.pkg,
            item.versions.iter().map(|x| format!("{}", x)).join(", ")
        );
    }
}