pub struct DepCache { /* private fields */ }Implementations§
Methods from Deref<Target = DepCache>§
pub fn init(&self, callback: &mut DynOperationProgress) -> Result<(), Exception>
sourcepub fn fix_broken(&self) -> bool
pub fn fix_broken(&self) -> bool
Autoinstall every broken package and run the problem resolver Returns false if the problem resolver fails.
sourcepub fn action_group(&self) -> ActionGroup
pub fn action_group(&self) -> ActionGroup
Return a new ActionGroup of the current DepCache
ActionGroup will be released once it leaves scope or [‘ActionGroup::release’] is called
sourcepub fn full_upgrade(
&self,
progress: &mut DynOperationProgress
) -> Result<(), Exception>
pub fn full_upgrade( &self, progress: &mut DynOperationProgress ) -> Result<(), Exception>
Perform a Full Upgrade. Remove and install new packages if necessary.
sourcepub fn safe_upgrade(
&self,
progress: &mut DynOperationProgress
) -> Result<(), Exception>
pub fn safe_upgrade( &self, progress: &mut DynOperationProgress ) -> Result<(), Exception>
Perform a Safe Upgrade. Neither remove or install new packages.
sourcepub fn install_upgrade(
&self,
progress: &mut DynOperationProgress
) -> Result<(), Exception>
pub fn install_upgrade( &self, progress: &mut DynOperationProgress ) -> Result<(), Exception>
Perform an Install Upgrade. New packages will be installed but nothing will be removed.
sourcepub fn is_upgradable(&self, pkg: &Package) -> bool
pub fn is_upgradable(&self, pkg: &Package) -> bool
sourcepub fn is_auto_installed(&self, pkg: &Package) -> bool
pub fn is_auto_installed(&self, pkg: &Package) -> bool
Is the Package auto installed? Packages marked as auto installed are usually dependencies.
sourcepub fn is_garbage(&self, pkg: &Package) -> bool
pub fn is_garbage(&self, pkg: &Package) -> bool
Is the Package able to be auto removed?
sourcepub fn marked_install(&self, pkg: &Package) -> bool
pub fn marked_install(&self, pkg: &Package) -> bool
Is the Package marked for install?
sourcepub fn marked_upgrade(&self, pkg: &Package) -> bool
pub fn marked_upgrade(&self, pkg: &Package) -> bool
Is the Package marked for upgrade?
sourcepub fn marked_purge(&self, pkg: &Package) -> bool
pub fn marked_purge(&self, pkg: &Package) -> bool
Is the Package marked to be purged?
sourcepub fn marked_delete(&self, pkg: &Package) -> bool
pub fn marked_delete(&self, pkg: &Package) -> bool
Is the Package marked for removal?
sourcepub fn marked_keep(&self, pkg: &Package) -> bool
pub fn marked_keep(&self, pkg: &Package) -> bool
Is the Package marked for keep?
sourcepub fn marked_downgrade(&self, pkg: &Package) -> bool
pub fn marked_downgrade(&self, pkg: &Package) -> bool
Is the Package marked for downgrade?
sourcepub fn marked_reinstall(&self, pkg: &Package) -> bool
pub fn marked_reinstall(&self, pkg: &Package) -> bool
Is the Package marked for reinstall?
sourcepub fn mark_keep(&self, pkg: &Package) -> bool
pub fn mark_keep(&self, pkg: &Package) -> bool
§Mark a package for keep.
§Returns:
This means that the package will not be changed from its current version. This will not stop a reinstall, but will stop removal, upgrades and downgrades
We don’t believe that there is any reason to unmark packages for keep. If someone has a reason, and would like it implemented, please put in a feature request.
sourcepub fn mark_delete(&self, pkg: &Package, purge: bool) -> bool
pub fn mark_delete(&self, pkg: &Package, purge: bool) -> bool
sourcepub fn mark_install(
&self,
pkg: &Package,
auto_inst: bool,
from_user: bool
) -> bool
pub fn mark_install( &self, pkg: &Package, auto_inst: bool, from_user: bool ) -> bool
§Mark a package for installation.
§auto_inst:
§from_user:
- true = The package will be marked manually installed.
- false = The package will be unmarked automatically installed.
§Returns:
If a package is already installed, at the latest version,
and you mark that package for install you will get true,
but the package will not be altered.
pkg.marked_install() will be false
sourcepub fn set_candidate_version(&self, ver: &Version)
pub fn set_candidate_version(&self, ver: &Version)
Set a version to be the candidate of it’s package.
sourcepub fn unsafe_candidate_version(&self, pkg: &Package) -> Version
pub fn unsafe_candidate_version(&self, pkg: &Package) -> Version
Get a pointer to the version that is set to be installed.
Safety: If there is no candidate the inner pointer will be null. This will cause segfaults if methods are used on a Null Version.
sourcepub fn mark_reinstall(&self, pkg: &Package, reinstall: bool)
pub fn mark_reinstall(&self, pkg: &Package, reinstall: bool)
sourcepub fn is_now_broken(&self, pkg: &Package) -> bool
pub fn is_now_broken(&self, pkg: &Package) -> bool
Is the installed Package broken?
sourcepub fn is_inst_broken(&self, pkg: &Package) -> bool
pub fn is_inst_broken(&self, pkg: &Package) -> bool
Is the Package to be installed broken?
sourcepub fn install_count(&self) -> u32
pub fn install_count(&self) -> u32
The number of packages marked for installation.
sourcepub fn delete_count(&self) -> u32
pub fn delete_count(&self) -> u32
The number of packages marked for removal.
sourcepub fn keep_count(&self) -> u32
pub fn keep_count(&self) -> u32
The number of packages marked for keep.
sourcepub fn broken_count(&self) -> u32
pub fn broken_count(&self) -> u32
The number of packages with broken dependencies in the cache.
sourcepub fn download_size(&self) -> u64
pub fn download_size(&self) -> u64
The size of all packages to be downloaded.
sourcepub fn disk_size(&self) -> i64
pub fn disk_size(&self) -> i64
The amount of space required for installing/removing the packages,“
i.e. the Installed-Size of all packages marked for installation“ minus the Installed-Size of all packages for removal.“