revert pyhton3 part that was commit by mistake in #ab8b3ded
[platform/upstream/libsolv.git] / doc / libsolv-bindings.txt
index a5fde9d..eed9698 100644 (file)
@@ -566,7 +566,7 @@ desired solvable by Id.
 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)
@@ -935,7 +935,7 @@ areas.
 
 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)
@@ -1277,6 +1277,18 @@ Return a tuple containing the on-media location and an optional
 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)
@@ -1306,6 +1318,22 @@ are not installable if the system does not support their architecture.
 
 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()
@@ -2174,6 +2202,47 @@ The problem can be solved by allowing to replace the package with some
 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 */
@@ -2186,14 +2255,14 @@ Back pointer to pool.
 === 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.
@@ -2217,6 +2286,14 @@ Return the transaction to implement the calculated package changes. A transactio
 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
@@ -3248,6 +3325,18 @@ Return the delta rpm sequence from the structure describing a delta rpm.
 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>