URPM::Resolve - Resolve routines for URPM/urpmi
The property2name* functions parse things like "mageia-release[>= 1]" which is the format returned by URPM.xs for ->requires, ->provides, ->conflicts...
Returns the property name (eg: "mageia-release" in above example)
Returns the property name & range (eg: "mageia-release" & ">= 1" in above example)
Returns the property name, operator & range (eg: "mageia-release", ">=", & "1" in above example)
Those are wrappers around $state (cf "The $state object" in URPM).
Returns the ids of the packages to remove
Returns the ids of the packages that are either to remove or are obsoleted
Is "strict-arch" wanted? (cf "man urpmi") Since it's slower we only force it on bi-arch
Checks whether $pkg could be installed under strict-arch policy (ie check whether $pkg->name with different arch is not installed)
Check whether $installed_pkg and $pkg have same arch (except for src/noarch of course)
Returns the architecture of package $n in rpm DB
Is $pkg->name installed?
Finds $pkg "provides" that matches $provide_name, and returns the version provided. eg: $pkg provides "a = 3", $provide_name is "a > 1", returns "3"
Find the package (or packages) to install matching $id_prop. Returns (list ref of matches, list ref of preferred matches) (see also find_candidate_packages())
Prefer the pkgs corresponding to installed/selected kernels
Packages that require locales-xxx when the corresponding locales are already installed should be preferred over packages that require locales which are not installed.
eg: locales-fr & locales-de are installed, prefer firefox-fr & firefox-de which respectively require locales-fr & locales-de
Return the medium that contains the URPM::Package $pkg
Find candidates packages from a require string (or id). Takes care of choices using the '|' separator. (nb: see also find_required_package())
Return packages requiring $property_name
Return ids of packages requiring $property_name
Return unresolved requires of a package (a new one or an existing one).
This function is "recommends vs requires" safe: Traversing DB on 'whatrequires' will give both requires & recommends, but ->unsatisfied_requires() will check $p->requires and so filter out recommends
# LOG: do not ignore dropped provide from updated package (mdvbz#40842) # (http://svn.mandriva.com/viewvc/soft/rpm/perl-URPM/trunk/URPM/Resolve.pm?r1=242655&r2=242656&) # TV: was introduced in order to replace one with_db_unsatisfied_requires() call by with_any_unsatisfied_requires()
See above...
Used when a require is not available
Keep track of what causes closure. Set removed and obsoleted level.
Close rejected (as urpme previously) for package to be removable without error.
Resolve dependencies of requested packages; keep resolution state to speed up process.
A requested package is marked to be installed; once done, an upgrade flag or an installed flag is set according to the needs of the installation of this package.
Other required packages will have a required flag set along with an upgrade flag or an installed flag.
Base flag should always be "installed" or "upgraded".
The following options are recognized :
It actually calls resolve_requested__no_recommends() and resolve_requested_recommends().
Select newly recommended package is installed as if (hard) required.
Like resolve_requested() but doesn't handle recommends
Do the opposite of the resolve_requested: unselect a package and extend to any package not requested that is no longer needed by any other package.
Return the packages that have been deselected.
Determine dependencies that can safely been removed and are not requested. Return the packages that have been deselected.
Take a string of package ids (eg: "4897|4564|454") that represent packages providing some dependancy. Return string of package names corresponding to package ids. eg: "libgtk1-devel|libgtk2-devel|libgtk3-devel" for ids corresponding to "gtk-devel"
$dep is a hashref: { required => $ID, requested => $requested->{$ID} } # CHECK IT REALLY IS AN ID HERE => WE SHOULD REALLY DOCUMENT $requested
Returns package name corresponding to package ID (or ID if not numerical)
Return package names corresponding to package ids
Return package fullnames corresponding to package ids. identical to _ids_to_names() modulo short name vs full name
Compute selected size by removing any removed or obsoleted package. Returns total package size
Compute selected size by removing any removed or obsoleted package. Returns both total package size & total filesize.
Adds packages flags according to an array containing packages names. $val is an array reference (as returned by get_packages_list) containing package names, or a regular expression matching against the fullname, if enclosed in slashes. %options :
Select packages to upgrade, according to package already registered. By default, only takes best package and its obsoleted and compute all installed or upgrade flag. (used for --auto-select)
Sort the graph
nb: this handles $nodes list not containing all $nodes that can be seen in $edges
Build transaction set for given selection Options: start, end, idlist, split_length, keep
Copyright (C) 2002-2005 MandrakeSoft SA
Copyright (C) 2005-2010 Mandriva SA
Copyright (C) 2011-2016 Mageia
To install URPM::Resolve, copy and paste the appropriate command in to your terminal.
cpanm
cpanm URPM::Resolve
CPAN shell
perl -MCPAN -e shell install URPM::Resolve
For more information on module installation, please visit the detailed CPAN module installation guide.