#[repr(C)]pub struct PkgDepCache { /* private fields */ }
Implementations§
Source§impl PkgDepCache
impl PkgDepCache
Source§impl PkgDepCache
impl PkgDepCache
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.
Source§impl PkgDepCache
impl PkgDepCache
Sourcepub unsafe fn action_group(&self) -> UniquePtr<ActionGroup>
pub unsafe fn action_group(&self) -> UniquePtr<ActionGroup>
Return a new ActionGroup
of the current DepCache
ActionGroup will be released once it leaves scope or [‘ActionGroup::release’] is called
§Safety
The returned UniquePtr cannot outlive the cache.
Source§impl PkgDepCache
impl PkgDepCache
Sourcepub fn upgrade(
&self,
progress: Pin<&mut OperationProgress<'_>>,
upgrade_mode: i32,
) -> Result<(), Exception>
pub fn upgrade( &self, progress: Pin<&mut OperationProgress<'_>>, upgrade_mode: i32, ) -> Result<(), Exception>
Perform an Upgrade.
§mark_auto:
- [0] = Remove and install new packages if necessary.
- [1] = New packages will be installed but nothing will be removed.
- [3] = Neither remove or install new packages.
Source§impl PkgDepCache
impl PkgDepCache
Sourcepub fn is_upgradable(&self, pkg: &PkgIterator) -> bool
pub fn is_upgradable(&self, pkg: &PkgIterator) -> bool
Check if the package is upgradable.
Source§impl PkgDepCache
impl PkgDepCache
Sourcepub fn is_auto_installed(&self, pkg: &PkgIterator) -> bool
pub fn is_auto_installed(&self, pkg: &PkgIterator) -> bool
Is the Package auto installed? Packages marked as auto installed are usually dependencies.
Source§impl PkgDepCache
impl PkgDepCache
Sourcepub fn is_garbage(&self, pkg: &PkgIterator) -> bool
pub fn is_garbage(&self, pkg: &PkgIterator) -> bool
Is the Package able to be auto removed?
Source§impl PkgDepCache
impl PkgDepCache
Sourcepub fn marked_install(&self, pkg: &PkgIterator) -> bool
pub fn marked_install(&self, pkg: &PkgIterator) -> bool
Is the Package marked for install?
Source§impl PkgDepCache
impl PkgDepCache
Sourcepub fn marked_upgrade(&self, pkg: &PkgIterator) -> bool
pub fn marked_upgrade(&self, pkg: &PkgIterator) -> bool
Is the Package marked for upgrade?
Source§impl PkgDepCache
impl PkgDepCache
Sourcepub fn marked_purge(&self, pkg: &PkgIterator) -> bool
pub fn marked_purge(&self, pkg: &PkgIterator) -> bool
Is the Package marked to be purged?
Source§impl PkgDepCache
impl PkgDepCache
Sourcepub fn marked_delete(&self, pkg: &PkgIterator) -> bool
pub fn marked_delete(&self, pkg: &PkgIterator) -> bool
Is the Package marked for removal?
Source§impl PkgDepCache
impl PkgDepCache
Sourcepub fn marked_keep(&self, pkg: &PkgIterator) -> bool
pub fn marked_keep(&self, pkg: &PkgIterator) -> bool
Is the Package marked for keep?
Source§impl PkgDepCache
impl PkgDepCache
Sourcepub fn marked_downgrade(&self, pkg: &PkgIterator) -> bool
pub fn marked_downgrade(&self, pkg: &PkgIterator) -> bool
Is the Package marked for downgrade?
Source§impl PkgDepCache
impl PkgDepCache
Sourcepub fn marked_reinstall(&self, pkg: &PkgIterator) -> bool
pub fn marked_reinstall(&self, pkg: &PkgIterator) -> bool
Is the Package marked for reinstall?
Source§impl PkgDepCache
impl PkgDepCache
Source§impl PkgDepCache
impl PkgDepCache
Sourcepub fn mark_keep(&self, pkg: &PkgIterator) -> bool
pub fn mark_keep(&self, pkg: &PkgIterator) -> 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.
Source§impl PkgDepCache
impl PkgDepCache
Source§impl PkgDepCache
impl PkgDepCache
Sourcepub fn mark_install(
&self,
pkg: &PkgIterator,
auto_inst: bool,
from_user: bool,
) -> bool
pub fn mark_install( &self, pkg: &PkgIterator, 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
Source§impl PkgDepCache
impl PkgDepCache
Sourcepub fn set_candidate_version(&self, ver: &VerIterator)
pub fn set_candidate_version(&self, ver: &VerIterator)
Set a version to be the candidate of it’s package.
Source§impl PkgDepCache
impl PkgDepCache
Sourcepub unsafe fn candidate_version(
&self,
pkg: &PkgIterator,
) -> UniquePtr<VerIterator>
pub unsafe fn candidate_version( &self, pkg: &PkgIterator, ) -> UniquePtr<VerIterator>
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.
Using crate::raw::IntoRawIter::make_safe
to convert to an Option
is recommended.
The returned UniquePtr cannot outlive the cache.
Source§impl PkgDepCache
impl PkgDepCache
Sourcepub unsafe fn install_version(
&self,
pkg: &PkgIterator,
) -> UniquePtr<VerIterator>
pub unsafe fn install_version( &self, pkg: &PkgIterator, ) -> UniquePtr<VerIterator>
Get a pointer to the version that is installed.
§Safety
If there is no version the inner pointer will be null. This will cause segfaults if methods are used on a Null Version.
Using crate::raw::IntoRawIter::make_safe
to convert to an Option
is recommended.
The returned UniquePtr cannot outlive the cache.
Source§impl PkgDepCache
impl PkgDepCache
Sourcepub fn dep_state(&self, dep: &DepIterator) -> u8
pub fn dep_state(&self, dep: &DepIterator) -> u8
Returns the state of the dependency as u8
Source§impl PkgDepCache
impl PkgDepCache
Sourcepub fn is_important_dep(&self, dep: &DepIterator) -> bool
pub fn is_important_dep(&self, dep: &DepIterator) -> bool
Source§impl PkgDepCache
impl PkgDepCache
Source§impl PkgDepCache
impl PkgDepCache
Sourcepub fn is_now_broken(&self, pkg: &PkgIterator) -> bool
pub fn is_now_broken(&self, pkg: &PkgIterator) -> bool
Is the installed Package broken?
Source§impl PkgDepCache
impl PkgDepCache
Sourcepub fn is_inst_broken(&self, pkg: &PkgIterator) -> bool
pub fn is_inst_broken(&self, pkg: &PkgIterator) -> bool
Is the Package to be installed broken?
Source§impl PkgDepCache
impl PkgDepCache
Sourcepub fn install_count(&self) -> u32
pub fn install_count(&self) -> u32
The number of packages marked for installation.
Source§impl PkgDepCache
impl PkgDepCache
Sourcepub fn delete_count(&self) -> u32
pub fn delete_count(&self) -> u32
The number of packages marked for removal.
Source§impl PkgDepCache
impl PkgDepCache
Sourcepub fn keep_count(&self) -> u32
pub fn keep_count(&self) -> u32
The number of packages marked for keep.
Source§impl PkgDepCache
impl PkgDepCache
Sourcepub fn broken_count(&self) -> u32
pub fn broken_count(&self) -> u32
The number of packages with broken dependencies in the cache.
Source§impl PkgDepCache
impl PkgDepCache
Sourcepub fn download_size(&self) -> u64
pub fn download_size(&self) -> u64
The size of all packages to be downloaded.