Go to file
2017-11-17 09:00:44 +00:00
apt-pkg-c expose version comparison 2017-07-20 12:45:30 +01:00
examples example of running on docker 2017-10-15 21:05:14 +01:00
src some extra iterator utilities 2017-10-15 15:44:24 +01:00
.gitignore list packages (after manual make) 2017-07-12 21:18:34 +01:00
.travis.yml try and convince travis to run in fast mode 2017-09-13 08:33:02 +01:00
build.rs cargo upgrade + fix deprecation warning 2017-09-13 08:28:30 +01:00
Cargo.toml less specific version declarations 2017-11-17 09:00:44 +00:00
LICENSE.MIT docs / crates.io stuff 2017-07-13 16:12:58 +01:00
README.md example of running on docker 2017-10-15 21:05:14 +01:00

This crate provides bindings to libapt-pkg.

Build status

Documentation and Examples

See the examples/ folder for some partial implementations of some commands.

https://docs.rs/apt-pkg-native

License Note

While the code in this crate is available under a permissive MIT license, it is useless without libapt-pkg, which is GPL2+.

Building

libapt-pkg-dev must be installed. The gcc crate is used to try and find a native compiler.

Thread safety

It is intended that the crate should be usable from multiple threads. However, this is generally implemented using singletons, which may be really annoying for your use-case.

apt does not have a concurrency model: you may not use threads.

Since apt 1.4 or 1.5 (in Debian Stretch (2017), but not in Xenial 16.04), some operations are thread safe: it should be possible to initialise the cache twice in parallel. As these versions of apt are not widespread, the API of this crate does not attempt to expose this.

Switching distro with docker

examples/on-sid has a docker file which builds a minimum Debian image with typical package lists downloaded. You can run a tool in it, from this directory, by:

(cd examples/on-sid && make)
docker run -v $(pwd):/mnt sid-sources-list /mnt/target/release/examples/sources