Expand description
Contains miscellaneous helper utilities.
Enums§
Functions§
- apt_
is_ locked - Checks if any locks are currently active for the lockfile. Note that this
will only return
trueif the current process has an active lock, while calls toapt_lockwill return anAptErrorsif another process has an active lock. - apt_
lock - Lock the APT lockfile.
This should be done before modifying any APT files
such as with
crate::cache::Cache::updateand thenapt_unlockshould be called after. - apt_
lock_ inner - Unlock the Dpkg lockfile.
This should be done before manually running
crate::cache::Cache::do_installand thenapt_unlock_innershould be called after. - apt_
unlock - Unlock the APT lockfile.
- apt_
unlock_ inner - Unlock the Dpkg lockfile.
- cmp_
versions - Compares two package versions,
ver1andver2. The returned enum variant applies to the first version passed in. - get_
apt_ progress_ string - Get an APT-styled progress bar.
- show_
broken_ pkg - Reference implementation to print broken packages just like apt does.
- terminal_
height - Get the terminal’s height, i.e. the number of rows it has.
- terminal_
width - Get the terminal’s width, i.e. the number of columns it has.
- time_
str - Converts seconds into a human readable time string.
- unit_
str - Converts bytes into human readable output.