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
true
if the current process has an active lock, while calls toapt_lock
will return anAptErrors
if 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::update
and thenapt_unlock
should be called after. - apt_
lock_ inner - Unlock the Dpkg lockfile.
This should be done before manually running
crate::cache::Cache::do_install
and thenapt_unlock_inner
should be called after. - apt_
unlock - Unlock the APT lockfile.
- apt_
unlock_ inner - Unlock the Dpkg lockfile.
- cmp_
versions - Compares two package versions,
ver1
andver2
. 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.