Lookup functions. Return the data element stored in the specified solvable.
You should probably use the methods of the Solvable class instead.
- Dataiterator Dataiterator(Id solvid, Id keyname, const char *match, int flags)
+ Dataiterator Dataiterator(Id solvid, Id keyname, const char *match = 0, int flags = 0)
my $di = $pool->Dataiterator($solvid, $keyname, $match, $flags);
di = pool.Dataiterator(solvid, keyname, match, flags)
di = pool.Dataiterator(solvid, keyname, match, flags)
Create a Selection consisting of all packages in the repository.
- Dataiterator Dataiterator(Id p, Id key, const char *match, int flags)
+ Dataiterator Dataiterator(Id p, Id key, const char *match = 0, int flags = 0)
my $di = $repo->Dataiterator($solvid, $keyname, $match, $flags);
di = repo.Dataiterator(solvid, keyname, match, flags)
di = repo.Dataiterator(solvid, keyname, match, flags)
media number for multi-part repositories (e.g. repositories
spawning multiple DVDs).
+ Dataiterator Dataiterator(Id keyname, const char *match = 0, int flags = 0)
+ my $di = $solvable->Dataiterator($keyname, $match, $flags);
+ di = solvable.Dataiterator(keyname, match, flags)
+ di = solvable.Dataiterator(keyname, match, flags)
+
+ for my $d (@$di)
+ for d in di:
+ for d in di
+
+Iterate over the matching data elements. See the Dataiterator class for more
+information.
+
void add_deparray(Id keyname, DepId dep, Id marker = -1);
$solvable->add_deparray($keyname, $dep);
solvable.add_deparray(keyname, dep)
Add a new dependency to the attributes stored in keyname.
+ void unset(Id keyname);
+ $solvable->unset($keyname);
+ solvable.unset(keyname)
+ solvable.unset(keyname)
+
+Delete data stored for the specific keyname.
+
bool installable();
$solvable->installable()
solvable.installable()
Return true if the solvable is installed on the system.
+ bool identical(Solvable *other)
+ $solvable->identical($other)
+ $solvable.identical(other)
+ $solvable.identical?(other)
+
+Return true if the two solvables are identical.
+
+ int evrcmp(Solvable *other)
+ $solvable->evrcmp(other)
+ $solvable.evrcmp(other)
+ $solvable.evrcmp(other)
+
+Returns -1 if the epoch/version/release of the solvable is less then the
+one from the other solvable, 1 if it is greater, and 0 if they are equal.
+Note that "equal" does not mean that the evr is identical.
+
Selection Selection(int setflags = 0)
my $sel = $solvable->Selection();
sel = solvable.Selection()
other package that has a different name.
+Reason constants
+
+*SOLVER_REASON_UNRELATED*::
+The package status did not change as it was not related to any job.
+
+*SOLVER_REASON_UNIT_RULE*::
+The package was installed/erased/kept because of a unit rule, i.e. a rule
+where all literals but one were false.
+
+*SOLVER_REASON_KEEP_INSTALLED*::
+The package was chosen when trying to keep as many packages installed as
+possible.
+
+*SOLVER_REASON_RESOLVE_JOB*::
+The decision happened to fulfill a job rule.
+
+*SOLVER_REASON_UPDATE_INSTALLED*::
+The decision happened to fulfill a package update request.
+
+*SOLVER_REASON_CLEANDEPS_ERASE*::
+The package was erased when cleaning up dependencies from other erased
+packages.
+
+*SOLVER_REASON_RESOLVE*::
+The package was installed to fulfill package dependencies.
+
+*SOLVER_REASON_WEAKDEP*::
+The package was installed because of a weak dependency (Recommends or
+Supplements).
+
+*SOLVER_REASON_RESOLVE_ORPHAN*::
+The decision about the package was made when deciding the fate of orphaned
+packages.
+
+*SOLVER_REASON_RECOMMENDED*::
+This is a special case of SOLVER_REASON_WEAKDEP.
+
+*SOLVER_REASON_SUPPLEMENTED*::
+This is a special case of SOLVER_REASON_WEAKDEP.
+
+
=== ATTRIBUTES ===
Pool *pool; /* read only */
=== METHODS ===
int set_flag(int flag, int value)
- my $oldvalue = $pool->set_flag($flag, $value);
- oldvalue = pool.set_flag(flag, value)
- oldvalue = pool.set_flag(flag, value)
+ my $oldvalue = $solver->set_flag($flag, $value);
+ oldvalue = solver.set_flag(flag, value)
+ oldvalue = solver.set_flag(flag, value)
int get_flag(int flag)
- my $value = $pool->get_flag($flag);
- value = pool.get_flag(flag)
- value = pool.get_flag(flag)
+ my $value = $solver->get_flag($flag);
+ value = solver.get_flag(flag)
+ value = solver.get_flag(flag)
Set/get a solver specific flag. The flags define the policies the solver has
to obey. The flags are explained in the CONSTANTS section of this class.
is available even if problems were found, this is useful for interactive user
interfaces that show both the job result and the problems.
+ int reason = describe_decision(Solvable *s, Rule *OUTPUT)
+ my ($reason, $rule) = $solver->describe_decision($solvable);
+ (reason, rule) = solver.describe_decision(solvable)
+ (reason, rule) = solver.describe_decision(solvable)
+
+Return the reason why a specific solvable was installed or erased. For most of
+the reasons the rule that triggered the decision is also returned.
+
The Problem Class
-----------------
Problems are the way of the solver to interact with the user. You can simply list
Return the number of solutions without creating solution objects.
+ <stringification>
+ my $str = $problem->str;
+ str = str(problem)
+ str = problem.to_s
+
+Return a string describing the problem. This is a convenience function, it is
+a shorthand for calling findproblemrule(), then ruleinfo() on the problem
+rule and problemstr() on the ruleinfo object.
+
The Rule Class
--------------
Rules are the basic block of sat solving. Each package dependency gets translated
The id of the repodata area. Repodata ids of different repositories overlap.
-=== METHODS ====
+=== METHODS ===
internalize();
$data->internalize();
Lookup functions. Note that the returned Ids are always translated into
the Ids of the global pool even if the repodata area contains its own pool.
+ Dataiterator Dataiterator(Id keyname, const char *match = 0, int flags = 0)
+ my $di = $datapos->Dataiterator($keyname, $match, $flags);
+ di = datapos.Dataiterator(keyname, match, flags)
+ di = datapos.Dataiterator(keyname, match, flags)
+
+ for my $d (@$di)
+ for d in di:
+ for d in di
+
+Iterate over the matching data elements. See the Dataiterator class for more
+information.
+
Author
------
Michael Schroeder <mls@suse.de>