yum.depsolve

Dependency resolution module for yum.

Depsolve

class yum.depsolve.Depsolve

Bases: object

A class for resolving dependencies.

allowedMultipleInstalls(po)

Return whether the given package object can be installed multiple times with different versions. For example, this would be true of kernels and kernel modules.

Parameters:po – the package object that this function will determine whether can be install multiple times
Returns:a boolean specifying whether po can be installed multiple times
cprof_resolveDeps()

Call resolveDeps(), and profile the call using the cprof profiler.

Returns:a tuple containing the result code and a list of result strings. This is simply the return value of resolveDeps() being passed up.
doTsSetup()

Sets up the transaction set before it is used.

initActionTs()

Set up the transaction set that will be used for all the work.

isPackageInstalled(pkgname)

Return whether the given package in installed.

Parameters:pkgname – the name of the package
Returns:whether the package in installed
populateTs(test=0, keepold=1)

Populate the transaction set.

Parameters:
  • test – unused
  • keepold – whether to keep old packages
prof_resolveDeps()

Call resolveDeps(), and profile the call using the hotshot profiler.

Returns:a tuple containing the result code and a list of result strings. This is simply the return value of resolveDeps() being passed up.
resolveDeps(full_check=True, skipping_broken=False)

Resolve dependencies for the packages in the current trasaction set.

Parameters:
  • full_check – whether to also check removes and installs, as well as dependencies
  • skipping_broken – if this is true, a message saying that dependency solving has finished successfully will not be output. This is useful since if there are broken packages that are being skipped, resolveDeps() will need to be called multiple times before dependency solving is completely finished
whatProvides(name, flags, version)

Search the packageSacks for what provides the specified feature or file.

Parameters:
  • name – a string specifying the file or feature to search for
  • flags – flags related to the search
  • version – the version to search for
Returns:

a ListPackagaSack containing the packages that match the arguments, and may be empty

DepCheck

class yum.depsolve.DepCheck

Bases: object

Object that YumDepsolver uses to see what things are needed to close the transaction set. The attributes requires and conflicts are lists of requires and conflicts in the current transaction set. Each item in the lists is a Requires or Conflicts object.

addConflicts(conflict_po_list, conflict_item)

Create and add a Conflicts object to the list of conflicts.

Parameters:
  • conflict_po_list – a list of conflicting package objects
  • conflict_item – what the conflict between the members of *conflict_po_list is.
addRequires(po, req_tuple_list)

Create and add a Requires object to the list of requires.

Parameters:
  • po – the package object involved in the requires
  • req_tuple_list – a list of required by po that are un-closed in the transaction set

Requires

class yum.depsolve.Requires(pkg, requires)

Bases: object

A pure data class for holding a package and the list of things it requires.

Conflicts

class yum.depsolve.Conflicts(pkglist, conflict)

Bases: object

A pure data class for holding a list packages and what the conflict between them is.

Table Of Contents

Previous topic

yum.constants

Next topic

yum.failover

This Page