Expand description

Contains miscellaneous helper utilities.

Modules

This module contains the bindings and structs shared with c++

Structs

Exception thrown from an extern "C++" function.

Enums

Disk Space that apt will use for a transaction.

Numeral System for unit conversion.

Functions

Checks if any locks are currently active for the lockfile. Note that this will only return true if the current process has an active lock, calls to apt_lock will return an Exception if another process has an active lock.

Lock the APT lockfile. This should be done before modifying any APT files such as with crate::cache::Cache::update and then apt_unlock should be called after.

Unlock the Dpkg lockfile. This should be done before manually running crate::cache::Cache::do_install and then apt_unlock_inner should be called after.

Unlock the APT lockfile.

Unlock the Dpkg lockfile.

Compares two package versions, ver1 and ver2. The returned enum variant applies to the first version passed in.

Get an APT-styled progress bar.

Get the terminal’s height, i.e. the number of rows it has.

Get the terminal’s width, i.e. the number of columns it has.

Converts seconds into a human readable time string.

Converts bytes into human readable output.