'\" t
.\" Title: Libsolv-Bindings
.\" Author: [see the "Author" section]
-.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 06/11/2013
+.\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
+.\" Date: 12/14/2015
.\" Manual: LIBSOLV
.\" Source: libsolv
.\" Language: English
.\"
-.TH "LIBSOLV\-BINDINGS" "3" "06/11/2013" "libsolv" "LIBSOLV"
+.TH "LIBSOLV\-BINDINGS" "3" "12/14/2015" "libsolv" "LIBSOLV"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.RE
.\}
.sp
-An special exception to this are iterator objects, they are encapsulated as tied arrays so that it is possible to iterate with a for() statement:
+A special exception to this are iterator objects, they are encapsulated as tied arrays so that it is possible to iterate with a for() statement:
.sp
.if n \{\
.RS 4
.RE
.\}
.sp
-Due to a bug in swig, stringification does not work for libsolv\(cqs object\&. Instead you have to call the object\(cqs str() method\&.
+Due to a bug in swig, stringification does not work for libsolv\(cqs objects\&. Instead, you have to call the object\(cqs str() method\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fIpool\fR\fB\&.appdata = 42\fR
-\fBprint "appdata is %\fR\fId\fR\fB" % (\fR\fIpool\fR\fB\&.appdata)\fR
+\fBprint "appdata is %d" % (\fR\fIpool\fR\fB\&.appdata)\fR
.fi
.if n \{\
.RE
.RE
.\}
.sp
-Arrays are passed an returned as list objects:
+Arrays are passed and returned as list objects:
.sp
.if n \{\
.RS 4
.\}
.nf
-\fIjobs\fR \fB=\fR \fI[\fR\fB]\fR
+\fIjobs\fR \fB= []\fR
\fIproblems\fR \fB=\fR \fIsolver\fR\fB\&.solve(\fR\fIjobs\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
-Arrays are passed an returned as array objects:
+Arrays are passed and returned as array objects:
.sp
.if n \{\
.RS 4
.\}
.nf
-\fIjobs\fR \fB=\fR \fI[\fR\fB]\fR
+\fIjobs\fR \fB= []\fR
\fIproblems\fR \fB=\fR \fIsolver\fR\fB\&.solve(\fR\fIjobs\fR\fB)\fR
.fi
.if n \{\
.RS 4
.\}
.nf
-\fBputs "empty\fR \fIrepo\fR\fB" if\fR \fIrepo\fR\fB\&.isempty?\fR
+\fBputs "empty" if\fR \fIrepo\fR\fB\&.isempty?\fR
+.fi
+.if n \{\
+.RE
+.\}
+.SH "TCL SPECIFICS"
+.sp
+Libsolv\(cqs tcl bindings can be loaded with the following statement:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBpackage require solv\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Objects are either created by calling class name prefixed with \(lqnew_\(rq, or they are returned by calling methods on other objects\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBset pool [solv::new_Pool]\fR
+\fBset repo [\fR\fI$pool\fR \fBadd_repo "my_first_repo"]\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Swig provides a \(lqcget\(rq method to read object attributes, and a \(lqconfigure\(rq method to write them:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fI$pool\fR \fBconfigure \-appdata 42\fR
+\fBputs "appdata is [\fR\fI$pool\fR \fBcget \-appdata]"\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+The tcl bindings provide a little helper to work with iterators in a foreach style:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBset iter [\fR\fI$pool\fR \fBsolvables_iter]\fR
+\fBsolv::iter s\fR \fI$iter\fR \fB{ \&.\&.\&. }\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+libsolv\(cqs arrays are mapped to tcl\(cqs lists:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBset jobs [list\fR \fI$job1 $job2\fR\fB]\fR
+\fBset problems [\fR\fI$solver\fR \fBsolve\fR \fI$jobs\fR\fB]\fR
+\fBputs "We have [llength\fR \fI$problems\fR\fB] problems\&.\&.\&."\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Stringification is done by calling the object\(cqs \(lqstr\(rq method\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBputs [\fR\fI$dep\fR \fBstr]\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+There is one exception: you have to use \(lqstringify\(rq for Datamatch objects, as swig reports a clash with the \(lqstr\(rq attribute\&. Some objects also support a \(lq==\(rq method for equality tests, and a \(lq!=\(rq method\&.
+.sp
+Swig implements all constants as numeric variables, constants belonging to a libsolv class are prefixed with the class name:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fI$pool\fR \fBset_flag\fR \fI$solv::Pool_POOL_FLAG_OBSOLETEUSESCOLORS\fR \fB1\fR
+\fBputs [\fR\fI$solvable\fR \fBlookup_str\fR \fI$solv::SOLVABLE_SUMMARY\fR\fB]\fR
.fi
.if n \{\
.RE
.PP
\fBREL_GT\fR
.RS 4
-the \(lqgreater then\(rq bit
+the \(lqgreater than\(rq bit
.RE
.PP
\fBREL_ARCH\fR
.RE
.\}
.sp
-Create a new pool instance\&. In most cases you just need one pool\&.
+Create a new pool instance\&. In most cases you just need one pool\&. Note that the returned object "owns" the pool, i\&.e\&. if the object is freed, the pool is also freed\&. You can use the disown method to break this ownership relation\&.
.SS "ATTRIBUTES"
.sp
.if n \{\
.\}
.sp
Define which repository contains all the installed packages\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBconst char *errstr;\fR /* read only */
+my \fI$err\fR \fB=\fR \fI$pool\fR\fB\->{errstr}\fR;
+\fIerr\fR \fB=\fR \fIpool\fR\fB\&.errstr\fR
+\fIerr\fR \fB=\fR \fIpool\fR\fB\&.errstr\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Return the last error string that was stored in the pool\&.
.SS "CONSTANTS"
.PP
\fBPOOL_FLAG_PROMOTEEPOCH\fR
.PP
\fBPOOL_FLAG_OBSOLETEUSESCOLORS\fR
.RS 4
-Rpm\(cqs multilib implementation (used in RedHat and Fedora) distinguishes between 32bit and 64bit packages (the terminology is that they have a different color)\&. If obsolteusescolors is set, packages with different colors will not obsolete each other\&.
+Rpm\(cqs multilib implementation (used in RedHat and Fedora) distinguishes between 32bit and 64bit packages (the terminology is that they have a different color)\&. If obsoleteusescolors is set, packages with different colors will not obsolete each other\&.
.RE
.PP
\fBPOOL_FLAG_IMPLICITOBSOLETEUSESCOLORS\fR
.PP
\fBPOOL_FLAG_ADDFILEPROVIDESFILTERED\fR
.RS 4
-Make the addfileprovides method only add files from the standard locations (i\&.e\&. the \(lqbin\(rq and \(lqetc\(rq directories)\&. This is useful if you have only few packages that use non\-standard file dependencies, but you still wand the fast speed that addfileprovides() generates\&.
+Make the addfileprovides method only add files from the standard locations (i\&.e\&. the \(lqbin\(rq and \(lqetc\(rq directories)\&. This is useful if you have only few packages that use non\-standard file dependencies, but you still want the fast speed that addfileprovides() generates\&.
.RE
.SS "METHODS"
.sp
.RE
.\}
.sp
-Free a pool\&. This is currently done with a method instead of relying on reference counting or garbage collection because it\(cqs hard to track every reference to a pool\&.
+Force a free of the pool\&. After this call, you must not access any object that still references the pool\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBvoid disown()\fR
+\fI$pool\fR\fB\->disown()\fR;
+\fIpool\fR\fB\&.disown()\fR
+\fIpool\fR\fB\&.disown()\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Break the ownership relation between the binding object and the pool\&. After this call, the pool will not get freed even if the object goes out of scope\&. This also means that you must manually call the free method to free the pool data\&.
.sp
.if n \{\
.RS 4
.RE
.\}
.sp
-Some package managers like rpm allow dependencies on files contained in other packages\&. To allow libsolv to deal with those dependencies in an efficient way, you need to call the addfileprovides method after creating and reading all repositories\&. This method will scan all dependency for file names and than scan all packages for matching files\&. If a filename has been matched, it will be added to the provides list of the corresponding package\&. The addfileprovides_queue variant works the same way but returns an array containing all file dependencies\&. This information can be stored in the meta section of the repositories to speed up the next time the repository is loaded and addfileprovides is called\&.
+Some package managers like rpm allow dependencies on files contained in other packages\&. To allow libsolv to deal with those dependencies in an efficient way, you need to call the addfileprovides method after creating and reading all repositories\&. This method will scan all dependency for file names and then scan all packages for matching files\&. If a filename has been matched, it will be added to the provides list of the corresponding package\&. The addfileprovides_queue variant works the same way but returns an array containing all file dependencies\&. This information can be stored in the meta section of the repositories to speed up the next time the repository is loaded and addfileprovides is called\&.
.sp
.if n \{\
.RS 4
.RE
.\}
.sp
-Return all solvables that provide the specified dependency\&. You can use either a Dep object or an simple Id as argument\&.
+Return all solvables that provide the specified dependency\&. You can use either a Dep object or a simple Id as argument\&.
.sp
.if n \{\
.RS 4
.RE
.\}
.sp
-Set the callback function called when repository metadata needs to be loaded on demand\&. To make use of this feature, you need to create repodata stubs that tell the library which data is available but not loaded\&. If later on the data needs to be accessed, the callback function is called with a repodata argument\&. You can then load the data (maybe fetching it first from an remote server)\&. The callback should return true if the data has been made available\&.
+Set the callback function called when repository metadata needs to be loaded on demand\&. To make use of this feature, you need to create repodata stubs that tell the library which data is available but not loaded\&. If later on the data needs to be accessed, the callback function is called with a repodata argument\&. You can then load the data (maybe fetching it first from a remote server)\&. The callback should return true if the data has been made available\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+/* bindings only */
+\fI$pool\fR\fB\->appdata_disown()\fR
+\fIpool\fR\fB\&.appdata_disown()\fR
+\fIpool\fR\fB\&.appdata_disown()\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Decrement the reference count of the appdata object\&. This can be used to break circular references (e\&.g\&. if the pool\(cqs appdata value points to some meta data structure that contains a pool handle)\&. If used incorrectly, this method can lead to application crashes, so beware\&. (This method is a no\-op for ruby and tcl\&.)
.SS "DATA RETRIEVAL METHODS"
.sp
In the following functions, the \fIkeyname\fR argument describes what to retrieve\&. For the standard cases you can use the available Id constants\&. For example,
.RS 4
.\}
.nf
-\fBDataiterator Dataiterator(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, const char *\fR\fImatch\fR\fB, int\fR \fIflags\fR\fB)\fR
+\fBDataiterator Dataiterator(Id\fR \fIkeyname\fR\fB, const char *\fR\fImatch\fR \fB= 0, int\fR \fIflags\fR \fB= 0)\fR
+my \fI$di\fR \fB=\fR \fI$pool\fR\fB\->Dataiterator(\fR\fI$keyname\fR\fB,\fR \fI$match\fR\fB,\fR \fI$flags\fR\fB)\fR;
+\fIdi\fR \fB=\fR \fIpool\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
+\fIdi\fR \fB=\fR \fIpool\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBDataiterator Dataiterator_solvid(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, const char *\fR\fImatch\fR \fB= 0, int\fR \fIflags\fR \fB= 0)\fR
my \fI$di\fR \fB=\fR \fI$pool\fR\fB\->Dataiterator(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB,\fR \fI$match\fR\fB,\fR \fI$flags\fR\fB)\fR;
\fIdi\fR \fB=\fR \fIpool\fR\fB\&.Dataiterator(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
\fIdi\fR \fB=\fR \fIpool\fR\fB\&.Dataiterator(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
.RE
.\}
.sp
-Iterate over the matching data elements\&. See the Dataiterator class for more information\&.
+Iterate over the matching data elements\&. See the Dataiterator class for more information\&. The Dataiterator method iterates over all solvables in the pool, whereas the Dataiterator_solvid only iterates over the specified solvable\&.
.SS "ID METHODS"
.sp
The following methods deal with Ids, i\&.e\&. integers representing objects in the pool\&. They are considered \(lqlow level\(rq, in most cases you would not use them but instead the object orientated methods\&.
.PP
\fBSUSETAGS_RECORD_SHARES\fR
.RS 4
-This is specific to the add_susetags() method\&. Susetags allows to refer to already read packages to save disk space\&. If this data sharing needs to work over multiple calls to add_susetags, you need to specify this flag so that the share information is made available to subsequent calls\&.
+This is specific to the add_susetags() method\&. Susetags allows one to refer to already read packages to save disk space\&. If this data sharing needs to work over multiple calls to add_susetags, you need to specify this flag so that the share information is made available to subsequent calls\&.
.RE
.SS "METHODS"
.sp
.RS 4
.\}
.nf
-\fBDataiterator Dataiterator(Id\fR \fIp\fR\fB, Id\fR \fIkey\fR\fB, const char *\fR\fImatch\fR\fB, int\fR \fIflags\fR\fB)\fR
-my \fI$di\fR \fB=\fR \fI$repo\fR\fB\->Dataiterator(\fR\fI$solvid\fR\fB,\fR \fI$keyname\fR\fB,\fR \fI$match\fR\fB,\fR \fI$flags\fR\fB)\fR;
-\fIdi\fR \fB=\fR \fIrepo\fR\fB\&.Dataiterator(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
-\fIdi\fR \fB=\fR \fIrepo\fR\fB\&.Dataiterator(\fR\fIsolvid\fR\fB,\fR \fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
+\fBDataiterator Dataiterator(Id\fR \fIkey\fR\fB, const char *\fR\fImatch\fR \fB= 0, int\fR \fIflags\fR \fB= 0)\fR
+my \fI$di\fR \fB=\fR \fI$repo\fR\fB\->Dataiterator(\fR\fI$keyname\fR\fB,\fR \fI$match\fR\fB,\fR \fI$flags\fR\fB)\fR;
+\fIdi\fR \fB=\fR \fIrepo\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
+\fIdi\fR \fB=\fR \fIrepo\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBDataiterator Dataiterator_meta(Id\fR \fIkey\fR\fB, const char *\fR\fImatch\fR \fB= 0, int\fR \fIflags\fR \fB= 0)\fR
+my \fI$di\fR \fB=\fR \fI$repo\fR\fB\->Dataiterator_meta(\fR\fI$keyname\fR\fB,\fR \fI$match\fR\fB,\fR \fI$flags\fR\fB)\fR;
+\fIdi\fR \fB=\fR \fIrepo\fR\fB\&.Dataiterator_meta(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
+\fIdi\fR \fB=\fR \fIrepo\fR\fB\&.Dataiterator_meta(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
.fi
.if n \{\
.RE
.RE
.\}
.sp
-Iterate over the matching data elements in this repository\&. See the Dataiterator class for more information\&.
+Iterate over the matching data elements in this repository\&. See the Dataiterator class for more information\&. The Dataiterator() method iterates over all solvables in a repository, whereas the Dataiterator_meta method only iterates over the repository\(cqs meta data\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBbool add_solv(const char *\fR\fIname\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
-\fI$repo\fR\fB\->add_solv(\fR\fI$name\fR\fB,\fR \fI$flags\fR\fB)\fR;
-\fIrepo\fR\fB\&.add_solv(\fR\fIname\fR\fB,\fR \fIflags\fR\fB)\fR
-\fIrepo\fR\fB\&.add_solv(\fR\fIname\fR\fB,\fR \fIflags\fR\fB)\fR
+\fI$repo\fR\fB\->add_solv(\fR\fI$name\fR\fB)\fR;
+\fIrepo\fR\fB\&.add_solv(\fR\fIname\fR\fB)\fR
+\fIrepo\fR\fB\&.add_solv(\fR\fIname\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.nf
\fBbool add_solv(FILE *\fR\fIfp\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
-\fI$repo\fR\fB\->add_solv(\fR\fI$fp\fR\fB,\fR \fI$flags\fR\fB)\fR;
-\fIrepo\fR\fB\&.add_solv(\fR\fIfp\fR\fB,\fR \fIflags\fR\fB)\fR
-\fIrepo\fR\fB\&.add_solv(\fR\fIfp\fR\fB,\fR \fIflags\fR\fB)\fR
+\fI$repo\fR\fB\->add_solv(\fR\fI$fp\fR\fB)\fR;
+\fIrepo\fR\fB\&.add_solv(\fR\fIfp\fR\fB)\fR
+\fIrepo\fR\fB\&.add_solv(\fR\fIfp\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.nf
\fBbool add_rpmdb(int\fR \fIflags\fR \fB= 0)\fR
-\fI$repo\fR\fB\->add_rpmdb(\fR\fI$flags\fR\fB)\fR;
-\fIrepo\fR\fB\&.add_rpmdb(\fR\fIflags\fR\fB)\fR
-\fIrepo\fR\fB\&.add_rpmdb(\fR\fIflags\fR\fB)\fR
+\fI$repo\fR\fB\->add_rpmdb()\fR;
+\fIrepo\fR\fB\&.add_rpmdb()\fR
+\fIrepo\fR\fB\&.add_rpmdb()\fR
.fi
.if n \{\
.RE
.\}
.nf
\fBbool add_rpmdb_reffp(FILE *\fR\fIreffp\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
-\fI$repo\fR\fB\->add_rpmdb_reffp(\fR\fI$reffp\fR\fB,\fR \fI$flags\fR\fB)\fR;
-\fIrepo\fR\fB\&.add_rpmdb_reffp(\fR\fI$reffp\fR\fB,\fR \fIflags\fR\fB)\fR
-\fIrepo\fR\fB\&.add_rpmdb_reffp(\fR\fI$reffp\fR\fB,\fR \fIflags\fR\fB)\fR
+\fI$repo\fR\fB\->add_rpmdb_reffp(\fR\fI$reffp\fR\fB)\fR;
+\fIrepo\fR\fB\&.add_rpmdb_reffp(\fR\fIreffp\fR\fB)\fR
+\fIrepo\fR\fB\&.add_rpmdb_reffp(\fR\fIreffp\fR\fB)\fR
.fi
.if n \{\
.RE
.RS 4
.\}
.nf
-\fBbool add_rpm(const char *\fR\fIname\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
-\fI$repo\fR\fB\->add_rpm(\fR\fI$name\fR\fB,\fR \fI$flags\fR\fB)\fR;
-\fIrepo\fR\fB\&.add_rpm(\fR\fIname\fR\fB,\fR \fIflags\fR\fB)\fR
-\fIrepo\fR\fB\&.add_rpm(\fR\fIname\fR\fB,\fR \fIflags\fR\fB)\fR
+\fBSolvable add_rpm(const char *\fR\fIfilename\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
+my \fI$solvable\fR \fB=\fR \fI$repo\fR\fB\->add_rpm(\fR\fI$filename\fR\fB)\fR;
+\fIsolvable\fR \fB=\fR \fIrepo\fR\fB\&.add_rpm(\fR\fIfilename\fR\fB)\fR
+\fIsolvable\fR \fB=\fR \fIrepo\fR\fB\&.add_rpm(\fR\fIfilename\fR\fB)\fR
.fi
.if n \{\
.RE
.RS 4
.\}
.nf
-\fBbool add_pubkey(const char *\fR\fIkeyfile\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
-\fI$repo\fR\fB\->add_pubkey(\fR\fI$keyfile\fR\fB)\fR;
-\fIrepo\fR\fB\&.add_pubkey(\fR\fI$keyfile\fR\fB)\fR
-\fIrepo\fR\fB\&.add_pubkey(\fR\fI$keyfile\fR\fB)\fR
+\fBSolvable add_pubkey(const char *\fR\fIkeyfile\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
+my \fI$solvable\fR \fB=\fR \fI$repo\fR\fB\->add_pubkey(\fR\fI$keyfile\fR\fB)\fR;
+\fIsolvable\fR \fB=\fR \fIrepo\fR\fB\&.add_pubkey(\fR\fIkeyfile\fR\fB)\fR
+\fIsolvable\fR \fB=\fR \fIrepo\fR\fB\&.add_pubkey(\fR\fIkeyfile\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.nf
\fBbool add_rpmmd(FILE *\fR\fIfp\fR\fB, const char *\fR\fIlanguage\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
-\fI$repo\fR\fB\->add_rpmmd(\fR\fI$fp\fR\fB,\fR \fI$language\fR\fB)\fR;
-\fIrepo\fR\fB\&.add_rpmmd(\fR\fIfp\fR\fB,\fR \fIlanguage\fR\fB)\fR
-\fIrepo\fR\fB\&.add_rpmmd(\fR\fIfp\fR\fB,\fR \fIlanguage\fR\fB)\fR
+\fI$repo\fR\fB\->add_rpmmd(\fR\fI$fp\fR\fB,\fR \fIundef\fR\fB)\fR;
+\fIrepo\fR\fB\&.add_rpmmd(\fR\fIfp\fR\fB,\fR \fINone\fR\fB)\fR
+\fIrepo\fR\fB\&.add_rpmmd(\fR\fIfp\fR\fB,\fR \fInil\fR\fB)\fR
.fi
.if n \{\
.RE
.RE
.\}
.sp
-Add the repomd\&.xml meta description from the "rpm\-md" format to the repository\&. This file contains information about the repository like keywords, and also a list of all database files with checksums\&. The data is added the the "meta" section of the repository, i\&.e\&. no package gets created\&.
+Add the repomd\&.xml meta description from the "rpm\-md" format to the repository\&. This file contains information about the repository like keywords, and also a list of all database files with checksums\&. The data is added to the "meta" section of the repository, i\&.e\&. no package gets created\&.
.sp
.if n \{\
.RS 4
.RS 4
.\}
.nf
-\fBbool add_deb(const char *\fR\fIfilename\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
-\fI$repo\fR\fB\->add_deb(\fR\fI$filename\fR\fB)\fR;
-\fIrepo\fR\fB\&.add_deb(\fR\fIfilename\fR\fB)\fR
-\fIrepo\fR\fB\&.add_deb(\fR\fIfilename\fR\fB)\fR
+\fBSolvable add_deb(const char *\fR\fIfilename\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
+my \fI$solvable\fR \fB=\fR \fI$repo\fR\fB\->add_deb(\fR\fI$filename\fR\fB)\fR;
+\fIsolvable\fR \fB=\fR \fIrepo\fR\fB\&.add_deb(\fR\fIfilename\fR\fB)\fR
+\fIsolvable\fR \fB=\fR \fIrepo\fR\fB\&.add_deb(\fR\fIfilename\fR\fB)\fR
.fi
.if n \{\
.RE
.nf
\fBbool add_mdk(FILE *\fR\fIfp\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
\fI$repo\fR\fB\->add_mdk(\fR\fI$fp\fR\fB)\fR;
-\fIrepo\fR\fB\&.add_mdk(\fR\fI$fp\fR\fB)\fR
-\fIrepo\fR\fB\&.add_mdk(\fR\fI$fp\fR\fB)\fR
+\fIrepo\fR\fB\&.add_mdk(\fR\fIfp\fR\fB)\fR
+\fIrepo\fR\fB\&.add_mdk(\fR\fIfp\fR\fB)\fR
.fi
.if n \{\
.RE
.nf
\fBbool add_mdk_info(FILE *\fR\fIfp\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
\fI$repo\fR\fB\->add_mdk(\fR\fI$fp\fR\fB)\fR;
-\fIrepo\fR\fB\&.add_mdk(\fR\fI$fp\fR\fB)\fR
-\fIrepo\fR\fB\&.add_mdk(\fR\fI$fp\fR\fB)\fR
+\fIrepo\fR\fB\&.add_mdk(\fR\fIfp\fR\fB)\fR
+\fIrepo\fR\fB\&.add_mdk(\fR\fIfp\fR\fB)\fR
.fi
.if n \{\
.RE
.nf
\fBbool add_arch_repo(FILE *\fR\fIfp\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
\fI$repo\fR\fB\->add_arch_repo(\fR\fI$fp\fR\fB)\fR;
-\fIrepo\fR\fB\&.add_arch_repo(\fR\fI$fp\fR\fB)\fR
-\fIrepo\fR\fB\&.add_arch_repo(\fR\fI$fp\fR\fB)\fR
+\fIrepo\fR\fB\&.add_arch_repo(\fR\fIfp\fR\fB)\fR
+\fIrepo\fR\fB\&.add_arch_repo(\fR\fIfp\fR\fB)\fR
.fi
.if n \{\
.RE
.nf
\fBbool add_arch_local(const char *\fR\fIdir\fR\fB, int\fR \fIflags\fR \fB= 0)\fR
\fI$repo\fR\fB\->add_arch_local(\fR\fI$dir\fR\fB)\fR;
-\fIrepo\fR\fB\&.add_arch_local(\fR\fI$dir\fR\fB)\fR
-\fIrepo\fR\fB\&.add_arch_local(\fR\fI$dir\fR\fB)\fR
+\fIrepo\fR\fB\&.add_arch_local(\fR\fIdir\fR\fB)\fR
+\fIrepo\fR\fB\&.add_arch_local(\fR\fIdir\fR\fB)\fR
.fi
.if n \{\
.RE
.RE
.\}
.sp
-Add the \(lqcontent\(rq meta description from the susetags format to the repository\&. This file contains information about the repository like keywords, and also a list of all database files with checksums\&. The data is added the the "meta" section of the repository, i\&.e\&. no package gets created\&.
+Add the \(lqcontent\(rq meta description from the susetags format to the repository\&. This file contains information about the repository like keywords, and also a list of all database files with checksums\&. The data is added to the "meta" section of the repository, i\&.e\&. no package gets created\&.
.sp
.if n \{\
.RS 4
.RS 4
.\}
.nf
+\fBDataiterator Dataiterator(Id\fR \fIkeyname\fR\fB, const char *\fR\fImatch\fR \fB= 0, int\fR \fIflags\fR \fB= 0)\fR
+my \fI$di\fR \fB=\fR \fI$solvable\fR\fB\->Dataiterator(\fR\fI$keyname\fR\fB,\fR \fI$match\fR\fB,\fR \fI$flags\fR\fB)\fR;
+\fIdi\fR \fB=\fR \fIsolvable\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
+\fIdi\fR \fB=\fR \fIsolvable\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBfor my\fR \fI$d\fR \fB(\fR\fI@$di\fR\fB)\fR
+\fBfor\fR \fId\fR \fBin\fR \fIdi\fR\fB:\fR
+\fBfor\fR \fId\fR \fBin\fR \fIdi\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Iterate over the matching data elements\&. See the Dataiterator class for more information\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
\fBvoid add_deparray(Id\fR \fIkeyname\fR\fB, DepId\fR \fIdep\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR;
\fI$solvable\fR\fB\->add_deparray(\fR\fI$keyname\fR\fB,\fR \fI$dep\fR\fB)\fR;
\fIsolvable\fR\fB\&.add_deparray(\fR\fIkeyname\fR\fB,\fR \fIdep\fR\fB)\fR
.RS 4
.\}
.nf
+\fBvoid unset(Id\fR \fIkeyname\fR\fB)\fR;
+\fI$solvable\fR\fB\->unset(\fR\fI$keyname\fR\fB)\fR;
+\fIsolvable\fR\fB\&.unset(\fR\fIkeyname\fR\fB)\fR
+\fIsolvable\fR\fB\&.unset(\fR\fIkeyname\fR\fB)\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Delete data stored for the specific keyname\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
\fBbool installable()\fR;
\fI$solvable\fR\fB\->installable()\fR
\fIsolvable\fR\fB\&.installable()\fR
.RS 4
.\}
.nf
+\fBbool identical(Solvable *\fR\fIother\fR\fB)\fR
+\fI$solvable\fR\fB\->identical(\fR\fI$other\fR\fB)\fR
+\fI$solvable\fR\fB\&.identical(\fR\fIother\fR\fB)\fR
+\fI$solvable\fR\fB\&.identical?(\fR\fIother\fR\fB)\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Return true if the two solvables are identical\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBint evrcmp(Solvable *\fR\fIother\fR\fB)\fR
+\fI$solvable\fR\fB\->evrcmp(\fR\fIother\fR\fB)\fR
+\fI$solvable\fR\fB\&.evrcmp(\fR\fIother\fR\fB)\fR
+\fI$solvable\fR\fB\&.evrcmp(\fR\fIother\fR\fB)\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Returns \-1 if the epoch/version/release of the solvable is less than 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\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
\fBSelection Selection(int\fR \fIsetflags\fR \fB= 0)\fR
my \fI$sel\fR \fB=\fR \fI$solvable\fR\fB\->Selection()\fR;
\fIsel\fR \fB=\fR \fIsolvable\fR\fB\&.Selection()\fR
.\}
.sp
The id of the solvable that matched\&.
-.SS "METHODS"
.sp
.if n \{\
.RS 4
.\}
.nf
-\fBId key_id()\fR;
-\fI$d\fR\fB\->key_id()\fR
-\fId\fR\fB\&.key_id()\fR
-\fId\fR\fB\&.key_id()\fR
+\fBId\fR \fIkey_id\fR;
+\fI$d\fR\fB\->{\fR\fIkey_id\fR\fB}\fR
+\fId\fR\fB\&.key_id\fR
+\fId\fR\fB\&.key_id\fR
.fi
.if n \{\
.RE
.RS 4
.\}
.nf
-\fBconst char *key_idstr()\fR;
-\fI$d\fR\fB\->key_idstr()\fR
-\fId\fR\fB\&.key_idstr()\fR
-\fId\fR\fB\&.key_idstr()\fR
+\fBconst char *\fR\fIkey_idstr\fR;
+\fI$d\fR\fB\->{\fR\fIkey_idstr\fR\fB}\fR
+\fId\fR\fB\&.key_idstr\fR
+\fId\fR\fB\&.key_idstr\fR
.fi
.if n \{\
.RE
.RS 4
.\}
.nf
-\fBId type_id()\fR;
-\fI$d\fR\fB\->type_id()\fR
-\fId\fR\fB\&.type_id()\fR
-\fId\fR\fB\&.type_id()\fR
+\fBId\fR \fItype_id\fR;
+\fI$d\fR\fB\->{\fR\fItype_id\fR\fB}\fR
+\fId\fR\fB\&.type_id\fR
+\fId\fR\fB\&.type_id\fR
.fi
.if n \{\
.RE
.RS 4
.\}
.nf
-\fBconst char *type_idstr()\fR;
-\fI$d\fR\fB\->type_idstr()\fR;
-\fId\fR\fB\&.type_idstr()\fR
-\fId\fR\fB\&.type_idstr()\fR
+\fBconst char *\fR\fItype_idstr\fR;
+\fI$d\fR\fB\->{\fR\fItype_idstr\fR\fB}\fR;
+\fId\fR\fB\&.type_idstr\fR
+\fId\fR\fB\&.type_idstr\fR
.fi
.if n \{\
.RE
.RS 4
.\}
.nf
-\fBId id()\fR;
-\fI$d\fR\fB\->id()\fR
-\fId\fR\fB\&.id()\fR
-\fId\fR\fB\&.id()\fR
+\fBId\fR \fIid\fR;
+\fI$d\fR\fB\->{id}\fR
+\fId\fR\fB\&.id\fR
+\fId\fR\fB\&.id\fR
.fi
.if n \{\
.RE
.RS 4
.\}
.nf
-\fBId idstr()\fR;
-\fI$d\fR\fB\->idstr()\fR
-\fId\fR\fB\&.idstr()\fR
-\fId\fR\fB\&.idstr()\fR
+\fBId\fR \fIidstr\fR;
+\fI$d\fR\fB\->{idstr}\fR
+\fId\fR\fB\&.idstr\fR
+\fId\fR\fB\&.idstr\fR
.fi
.if n \{\
.RE
.RS 4
.\}
.nf
-\fBconst char *str()\fR;
-\fI$d\fR\fB\->str()\fR
-\fId\fR\fB\&.str()\fR
-\fId\fR\fB\&.str()\fR
+\fBconst char *\fR\fIstr\fR;
+\fI$d\fR\fB\->{str}\fR
+\fId\fR\fB\&.str\fR
+\fId\fR\fB\&.str\fR
.fi
.if n \{\
.RE
.RS 4
.\}
.nf
-\fBunsigned long long num()\fR;
-\fI$d\fR\fB\->num()\fR
-\fId\fR\fB\&.num()\fR
-\fId\fR\fB\&.num()\fR
+\fBunsigned long long\fR \fInum\fR;
+\fI$d\fR\fB\->{num}\fR
+\fId\fR\fB\&.num\fR
+\fId\fR\fB\&.num\fR
.fi
.if n \{\
.RE
.RS 4
.\}
.nf
-\fBunsigned int num2()\fR;
-\fI$d\fR\fB\->num2()\fR
-\fId\fR\fB\&.num2()\fR
-\fId\fR\fB\&.num2()\fR
+\fBunsigned int\fR \fInum2\fR;
+\fI$d\fR\fB\->{num2}\fR
+\fId\fR\fB\&.num2\fR
+\fId\fR\fB\&.num2\fR
.fi
.if n \{\
.RE
.RS 4
.\}
.nf
+\fBunsigned int\fR \fIbinary\fR;
+\fI$d\fR\fB\->{binary}\fR
+\fId\fR\fB\&.binary\fR
+\fId\fR\fB\&.binary\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+The value in binary form, useful for checksums and other data that cannot be represented as a string\&.
+.SS "METHODS"
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
\fBDatapos pos()\fR;
my \fI$pos\fR \fB=\fR \fI$d\fR\fB\->pos()\fR;
\fIpos\fR \fB=\fR \fId\fR\fB\&.pos()\fR
.PP
\fBSELECTION_NAME\fR
.RS 4
-Create the selection by matching package names
+Create the selection by matching package names\&.
.RE
.PP
\fBSELECTION_PROVIDES\fR
.RS 4
-Create the selection by matching package provides
+Create the selection by matching package provides\&.
.RE
.PP
\fBSELECTION_FILELIST\fR
.RS 4
-Create the selection by matching package files
+Create the selection by matching package files\&.
.RE
.PP
\fBSELECTION_CANON\fR
.PP
\fBSOLVER_MULTIVERSION\fR
.RS 4
-Mark the matched packages for multiversion install\&. If they get to be installed because of some other job, the installation will keep the old version of the package installed (for rpm by using \(lq\-i\(rq instead of \(lq\-U\(rq)\&.
+Mark the matched packages for multiversion install\&. If they get to be installed because of some other job, the installation will keep the old version of the package installed (for rpm this is done by using \(lq\-i\(rq instead of \(lq\-U\(rq)\&.
.RE
.PP
\fBSOLVER_LOCK\fR
.PP
\fBSOLVER_DISTUPGRADE\fR
.RS 4
-Update the matching installed packages to the best version included in one of the repositories\&. After this operation, all come from one of the available repositories except orphaned packages\&. Orphaned packages are packages that have no relation to the packages in the repositories, i\&.e\&. no package in the repositories have the same name or obsolete the orphaned package\&. This action brings the installed packages in sync with the ones in the repository\&. It also turns of arch/vendor/version locking for the affected packages to simulate a fresh installation\&. This means that distupgrade can actually downgrade packages if only lower versions of a package are available in the repositories\&.
+Update the matching installed packages to the best version included in one of the repositories\&. After this operation, all come from one of the available repositories except orphaned packages\&. Orphaned packages are packages that have no relation to the packages in the repositories, i\&.e\&. no package in the repositories have the same name or obsolete the orphaned package\&. This action brings the installed packages in sync with the ones in the repository\&. By default it also turns of arch/vendor/version locking for the affected packages to simulate a fresh installation\&. This means that distupgrade can actually downgrade packages if only lower versions of a package are available in the repositories\&. You can tweak this behavior with the SOLVER_FLAG_DUP_ solver flags\&.
.RE
.PP
\fBSOLVER_DROP_ORPHANED\fR
The matching installed packages are considered to be installed by a user, thus not installed to fulfill some dependency\&. This is needed input for the calculation of unneeded packages for jobs that have the SOLVER_CLEANDEPS flag set\&.
.RE
.PP
+\fBSOLVER_ALLOWUNINSTALL\fR
+.RS 4
+Allow the solver to deinstall the matching installed packages if they get into the way of resolving a dependency\&. This is like the SOLVER_FLAG_ALLOW_UNINSTALL flag, but limited to a specific set of packages\&.
+.RE
+.PP
\fBSOLVER_JOBMASK\fR
.RS 4
A mask containing all the above action bits\&.
Allow the solver to erase installed packages to fulfill the jobs\&. This flag also includes the above flags\&. You may want to set this flag if you only have SOLVER_ERASE jobs, as in that case it\(cqs better for the user to check the transaction overview instead of approving every single package that needs to be erased\&.
.RE
.PP
+\fBSOLVER_FLAG_DUP_ALLOW_DOWNGRADE\fR
+.RS 4
+Like SOLVER_FLAG_ALLOW_DOWNGRADE, but used in distupgrade mode\&.
+.RE
+.PP
+\fBSOLVER_FLAG_DUP_ALLOW_ARCHCHANGE\fR
+.RS 4
+Like SOLVER_FLAG_ALLOW_ARCHCHANGE, but used in distupgrade mode\&.
+.RE
+.PP
+\fBSOLVER_FLAG_DUP_ALLOW_VENDORCHANGE\fR
+.RS 4
+Like SOLVER_FLAG_ALLOW_VENDORCHANGE, but used in distupgrade mode\&.
+.RE
+.PP
+\fBSOLVER_FLAG_DUP_ALLOW_NAMECHANGE\fR
+.RS 4
+Like SOLVER_FLAG_ALLOW_NAMECHANGE, but used in distupgrade mode\&.
+.RE
+.PP
\fBSOLVER_FLAG_NO_UPDATEPROVIDE\fR
.RS 4
If multiple packages obsolete an installed package, the solver checks the provides of every such package and ignores all packages that do not provide the installed package name\&. Thus, you can have an official update candidate that provides the old name, and other packages that also obsolete the package but are not considered for updating\&. If you cannot use this feature, you can turn it off by setting this flag\&.
.RS 4
Do not enable auto\-targeting up update and distupgrade jobs\&. See the section on targeted updates for more information\&.
.RE
+.PP
+\fBSOLVER_FLAG_KEEP_ORPHANS\fR
+.RS 4
+Do not allow orphaned packages to be deinstalled if they get in the way of resolving other packages\&.
+.RE
+.PP
+\fBSOLVER_FLAG_BREAK_ORPHANS\fR
+.RS 4
+Ignore dependencies of orphaned packages that get in the way of resolving non\-orphaned ones\&. Setting the flag might result in no longer working packages in case they are orphaned\&.
+.RE
+.PP
+\fBSOLVER_FLAG_FOCUS_INSTALLED\fR
+.RS 4
+Resolve installed packages before resolving the given job\&. Setting this flag means that the solver will prefer picking a package version that fits the other installed packages over updating installed packages\&.
+.RE
.sp
Basic rule types:
.PP
A rule of an unknown class\&. You should never encounter those\&.
.RE
.PP
-\fBSOLVER_RULE_RPM\fR
+\fBSOLVER_RULE_PKG\fR
.RS 4
-A package dependency rule, called rpm rule for historical reasons\&.
+A package dependency rule\&.
.RE
.PP
\fBSOLVER_RULE_UPDATE\fR
.PP
\fBSOLVER_RULE_FEATURE\fR
.RS 4
-Feature rules are fallback rules used when a update rule is disabled\&. They include all packages that may replace the installed package ignoring the update policy, i\&.e\&. they contain downgrades, arch changes and so on\&. Without them, the solver would simply erase installed packages if their update rule gets disabled\&.
+Feature rules are fallback rules used when an update rule is disabled\&. They include all packages that may replace the installed package ignoring the update policy, i\&.e\&. they contain downgrades, arch changes and so on\&. Without them, the solver would simply erase installed packages if their update rule gets disabled\&.
.RE
.PP
\fBSOLVER_RULE_JOB\fR
.PP
\fBSOLVER_RULE_DISTUPGRADE\fR
.RS 4
-This are simple negative assertions that make sure that only packages are kept that are also available in one of the repositories\&.
+These are simple negative assertions that make sure that only packages are kept that are also available in one of the repositories\&.
.RE
.PP
\fBSOLVER_RULE_INFARCH\fR
.PP
\fBSOLVER_RULE_LEARNT\fR
.RS 4
-These rules are generated by the solver to keep it from running into the same problem multiple times when it has to backtrack\&. They are the main reason why a sat solver is faster then other dependency solver implementations\&.
+These rules are generated by the solver to keep it from running into the same problem multiple times when it has to backtrack\&. They are the main reason why a sat solver is faster than other dependency solver implementations\&.
.RE
.sp
Special dependency rule types:
.PP
-\fBSOLVER_RULE_RPM_NOT_INSTALLABLE\fR
+\fBSOLVER_RULE_PKG_NOT_INSTALLABLE\fR
.RS 4
This rule was added to prevent the installation of a package of an architecture that does not work on the system\&.
.RE
.PP
-\fBSOLVER_RULE_RPM_NOTHING_PROVIDES_DEP\fR
+\fBSOLVER_RULE_PKG_NOTHING_PROVIDES_DEP\fR
.RS 4
The package contains a required dependency which was not provided by any package\&.
.RE
.PP
-\fBSOLVER_RULE_RPM_PACKAGE_REQUIRES\fR
+\fBSOLVER_RULE_PKG_REQUIRES\fR
.RS 4
-Similar to SOLVER_RULE_RPM_NOTHING_PROVIDES_DEP, but in this case some packages provided the dependency but none of them could be installed due to other dependency issues\&.
+Similar to SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP, but in this case some packages provided the dependency but none of them could be installed due to other dependency issues\&.
.RE
.PP
-\fBSOLVER_RULE_RPM_SELF_CONFLICT\fR
+\fBSOLVER_RULE_PKG_SELF_CONFLICT\fR
.RS 4
The package conflicts with itself\&. This is not allowed by older rpm versions\&.
.RE
.PP
-\fBSOLVER_RULE_RPM_PACKAGE_CONFLICT\fR
+\fBSOLVER_RULE_PKG_CONFLICTS\fR
.RS 4
To fulfill the dependencies two packages need to be installed, but one of the packages contains a conflict with the other one\&.
.RE
.PP
-\fBSOLVER_RULE_RPM_SAME_NAME\fR
+\fBSOLVER_RULE_PKG_SAME_NAME\fR
.RS 4
The dependencies can only be fulfilled by multiple versions of a package, but installing multiple versions of the same package is not allowed\&.
.RE
.PP
-\fBSOLVER_RULE_RPM_PACKAGE_OBSOLETES\fR
+\fBSOLVER_RULE_PKG_OBSOLETES\fR
.RS 4
To fulfill the dependencies two packages need to be installed, but one of the packages obsoletes the other one\&.
.RE
.PP
-\fBSOLVER_RULE_RPM_IMPLICIT_OBSOLETES\fR
+\fBSOLVER_RULE_PKG_IMPLICIT_OBSOLETES\fR
.RS 4
To fulfill the dependencies two packages need to be installed, but one of the packages has provides a dependency that is obsoleted by the other one\&. See the POOL_FLAG_IMPLICITOBSOLETEUSESPROVIDES flag\&.
.RE
.PP
-\fBSOLVER_RULE_RPM_INSTALLEDPKG_OBSOLETES\fR
+\fBSOLVER_RULE_PKG_INSTALLED_OBSOLETES\fR
.RS 4
To fulfill the dependencies a package needs to be installed that is obsoleted by an installed package\&. See the POOL_FLAG_NOINSTALLEDOBSOLETES flag\&.
.RE
.RS 4
The problem can be solved by allowing to replace the package with some other package that has a different name\&.
.RE
+.sp
+Reason constants
+.PP
+\fBSOLVER_REASON_UNRELATED\fR
+.RS 4
+The package status did not change as it was not related to any job\&.
+.RE
+.PP
+\fBSOLVER_REASON_UNIT_RULE\fR
+.RS 4
+The package was installed/erased/kept because of a unit rule, i\&.e\&. a rule where all literals but one were false\&.
+.RE
+.PP
+\fBSOLVER_REASON_KEEP_INSTALLED\fR
+.RS 4
+The package was chosen when trying to keep as many packages installed as possible\&.
+.RE
+.PP
+\fBSOLVER_REASON_RESOLVE_JOB\fR
+.RS 4
+The decision happened to fulfill a job rule\&.
+.RE
+.PP
+\fBSOLVER_REASON_UPDATE_INSTALLED\fR
+.RS 4
+The decision happened to fulfill a package update request\&.
+.RE
+.PP
+\fBSOLVER_REASON_CLEANDEPS_ERASE\fR
+.RS 4
+The package was erased when cleaning up dependencies from other erased packages\&.
+.RE
+.PP
+\fBSOLVER_REASON_RESOLVE\fR
+.RS 4
+The package was installed to fulfill package dependencies\&.
+.RE
+.PP
+\fBSOLVER_REASON_WEAKDEP\fR
+.RS 4
+The package was installed because of a weak dependency (Recommends or Supplements)\&.
+.RE
+.PP
+\fBSOLVER_REASON_RESOLVE_ORPHAN\fR
+.RS 4
+The decision about the package was made when deciding the fate of orphaned packages\&.
+.RE
+.PP
+\fBSOLVER_REASON_RECOMMENDED\fR
+.RS 4
+This is a special case of SOLVER_REASON_WEAKDEP\&.
+.RE
+.PP
+\fBSOLVER_REASON_SUPPLEMENTED\fR
+.RS 4
+This is a special case of SOLVER_REASON_WEAKDEP\&.
+.RE
.SS "ATTRIBUTES"
.sp
.if n \{\
.\}
.nf
\fBint set_flag(int\fR \fIflag\fR\fB, int\fR \fIvalue\fR\fB)\fR
-my \fI$oldvalue\fR \fB=\fR \fI$pool\fR\fB\->set_flag(\fR\fI$flag\fR\fB,\fR \fI$value\fR\fB)\fR;
-\fIoldvalue\fR \fB=\fR \fIpool\fR\fB\&.set_flag(\fR\fIflag\fR\fB,\fR \fIvalue\fR\fB)\fR
-\fIoldvalue\fR \fB=\fR \fIpool\fR\fB\&.set_flag(\fR\fIflag\fR\fB,\fR \fIvalue\fR\fB)\fR
+my \fI$oldvalue\fR \fB=\fR \fI$solver\fR\fB\->set_flag(\fR\fI$flag\fR\fB,\fR \fI$value\fR\fB)\fR;
+\fIoldvalue\fR \fB=\fR \fIsolver\fR\fB\&.set_flag(\fR\fIflag\fR\fB,\fR \fIvalue\fR\fB)\fR
+\fIoldvalue\fR \fB=\fR \fIsolver\fR\fB\&.set_flag(\fR\fIflag\fR\fB,\fR \fIvalue\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.nf
\fBint get_flag(int\fR \fIflag\fR\fB)\fR
-my \fI$value\fR \fB=\fR \fI$pool\fR\fB\->get_flag(\fR\fI$flag\fR\fB)\fR;
-\fIvalue\fR \fB=\fR \fIpool\fR\fB\&.get_flag(\fR\fIflag\fR\fB)\fR
-\fIvalue\fR \fB=\fR \fIpool\fR\fB\&.get_flag(\fR\fIflag\fR\fB)\fR
+my \fI$value\fR \fB=\fR \fI$solver\fR\fB\->get_flag(\fR\fI$flag\fR\fB)\fR;
+\fIvalue\fR \fB=\fR \fIsolver\fR\fB\&.get_flag(\fR\fIflag\fR\fB)\fR
+\fIvalue\fR \fB=\fR \fIsolver\fR\fB\&.get_flag(\fR\fIflag\fR\fB)\fR
.fi
.if n \{\
.RE
.\}
.sp
Return the transaction to implement the calculated package changes\&. A transaction is available even if problems were found, this is useful for interactive user interfaces that show both the job result and the problems\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBint\fR \fIreason\fR \fB= describe_decision(Solvable *\fR\fIs\fR\fB, Rule *\fR\fIOUTPUT\fR\fB)\fR
+my \fB(\fR\fI$reason\fR\fB,\fR \fI$rule\fR\fB) =\fR \fI$solver\fR\fB\->describe_decision(\fR\fI$solvable\fR\fB)\fR;
+\fB(\fR\fIreason\fR\fB,\fR \fIrule\fR\fB) =\fR \fIsolver\fR\fB\&.describe_decision(\fR\fIsolvable\fR\fB)\fR
+\fB(\fR\fIreason\fR\fB,\fR \fIrule\fR\fB) =\fR \fIsolver\fR\fB\&.describe_decision(\fR\fIsolvable\fR\fB)\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+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\&.
.SH "THE PROBLEM CLASS"
.sp
Problems are the way of the solver to interact with the user\&. You can simply list all problems and terminate your program, but a better way is to present solutions to the user and let him pick the ones he likes\&.
.\}
.sp
Return the number of solutions without creating solution objects\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB<stringification>\fR
+my \fI$str\fR \fB=\fR \fI$problem\fR\fB\->str\fR;
+\fIstr\fR \fB= str(\fR\fIproblem\fR\fB)\fR
+\fIstr\fR \fB=\fR \fIproblem\fR\fB\&.to_s\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+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\&.
.SH "THE RULE CLASS"
.sp
Rules are the basic block of sat solving\&. Each package dependency gets translated into one or multiple rules\&.
.PP
\fBSOLVER_TRANSACTION_MULTIREINSTALL\fR
.RS 4
-This element reinstalls a installed package keeping the other versions installed\&.
+This element reinstalls an installed package keeping the other versions installed\&.
.RE
.sp
Transaction element types, active view
.PP
\fBSOLVER_TRANSACTION_DOWNGRADE\fR
.RS 4
-This element installs a older version of an installed package\&.
+This element installs an older version of an installed package\&.
.RE
.PP
\fBSOLVER_TRANSACTION_OBSOLETES\fR
.RE
.\}
.sp
-Return all packages that are to be installed by the transaction\&. This are the packages that need to be downloaded from the repositories\&.
+Return all packages that are to be installed by the transaction\&. These are the packages that need to be downloaded from the repositories\&.
.sp
.if n \{\
.RS 4
.RE
.\}
.sp
-Order the steps in the transactions so that dependant packages are updated before packages that depend on them\&. For rpm, you can also use rpmlib\(cqs ordering functionality, debian\(cqs dpkg does not provide a way to order a transaction\&.
+Order the steps in the transactions so that dependent packages are updated before packages that depend on them\&. For rpm, you can also use rpmlib\(cqs ordering functionality, debian\(cqs dpkg does not provide a way to order a transaction\&.
.SS "ACTIVE/PASSIVE VIEW"
.sp
-Active view list what new packages get installed, while passive view shows what happens to the installed packages\&. Most often there\(cqs not much difference between the two modes, but things get interesting of multiple package get replaced by one new package\&. Say you have installed package A\-1\-1 and B\-1\-1, and now install A\-2\-1 with has a new dependency that obsoletes B\&. The transaction elements will be
+Active view lists what new packages get installed, while passive view shows what happens to the installed packages\&. Most often there\(cqs not much difference between the two modes, but things get interesting if multiple packages get replaced by one new package\&. Say you have installed packages A\-1\-1 and B\-1\-1, and now install A\-2\-1 which has a new dependency that obsoletes B\&. The transaction elements will be
.sp
.if n \{\
.RS 4
.RE
.\}
.sp
-Create an already finalized checksum object\&.
+Create an already finalized checksum object from a hex string\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBChksum Chksum_from_bin(Id\fR \fItype\fR\fB, char *\fR\fIbin\fR\fB)\fR
+my \fI$chksum\fR \fB= solv::Chksum\->from_bin(\fR\fI$type\fR\fB,\fR \fI$bin\fR\fB)\fR;
+\fIchksum\fR \fB= solv\&.Chksum\&.from_bin(\fR\fItype\fR\fB,\fR \fIbin\fR\fB)\fR
+\fIchksum\fR \fB= Solv::Chksum\&.from_bin(\fR\fItype\fR\fB,\fR \fIbin\fR\fB)\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Create an already finalized checksum object from a binary checksum\&.
.SS "ATTRIBUTES"
.sp
.if n \{\
.RE
.\}
.sp
-Add a string to the checksum\&.
+Add a (binary) string to the checksum\&.
.sp
.if n \{\
.RS 4
.RS 4
.\}
.nf
+\fBconst char *typestr()\fR
+my \fI$typestr\fR \fB=\fR \fI$chksum\fR\fB\->typestr()\fR;
+\fItypestr\fR \fB=\fR \fIchksum\fR\fB\&.typestr\fR
+\fItypestr\fR \fB=\fR \fIchksum\fR\fB\&.typestr\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Return the type of the checksum as a string, e\&.g\&. "sha256"\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
\fB<equality>\fR
\fBif (\fR\fI$chksum1\fR \fB==\fR \fI$chksum2\fR\fB)\fR
\fBif\fR \fIchksum1\fR \fB==\fR \fIchksum2\fR\fB:\fR
.RE
.\}
.sp
-Create a file handle from the specified file descriptor\&. The path argument is only used to select the correct (de\-)compression algorithm, use an empty path if you want to make sure to read/write raw data\&.
+Create a file handle from the specified file descriptor\&. The path argument is only used to select the correct (de\-)compression algorithm, use an empty path if you want to make sure to read/write raw data\&. The file descriptor is dup()ed before the file handle is created\&.
.SS "METHODS"
.sp
.if n \{\
.RS 4
.\}
.nf
+\fBvoid cloexec(bool\fR \fIstate\fR\fB)\fR
+\fI$file\fR\fB\->cloexec(\fR\fI$state\fR\fB)\fR
+\fIfile\fR\fB\&.cloexec(\fR\fIstate\fR\fB)\fR
+\fIfile\fR\fB\&.cloexec(\fR\fIstate\fR\fB)\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Set the close\-on\-exec flag of the file descriptor\&. The xfopen function returns files with close\-on\-exec turned on, so if you want to pass a file to some other process you need to call cloexec(0) before calling exec\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
\fBint dup()\fR
my \fI$fileno\fR \fB=\fR \fI$file\fR\fB\->dup()\fR;
\fIfileno\fR \fB=\fR \fIfile\fR\fB\&.dup()\fR
.RE
.\}
.sp
-Close the file\&. This is needed for languages like Ruby, that do not destruct objects right after they are no longer referenced\&. In that case, it is good style to close open files so that the file descriptors are freed right away\&. Returns false if there was an error\&.
+Close the file\&. This is needed for languages like Ruby that do not destruct objects right after they are no longer referenced\&. In that case, it is good style to close open files so that the file descriptors are freed right away\&. Returns false if there was an error\&.
.SH "THE REPODATA CLASS"
.sp
The Repodata stores attributes for packages and the repository itself, each repository can have multiple repodata areas\&. You normally only need to directly access them if you implement lazy downloading of repository data\&. Repodata areas are created by calling the repository\(cqs add_repodata() method or by using repo_add methods without the REPO_REUSE_REPODATA or REPO_USE_LOADING flag\&.
.\}
.sp
The id of the repodata area\&. Repodata ids of different repositories overlap\&.
-.SS "METHODS ===="
+.SS "METHODS"
.sp
.if n \{\
.RS 4
.\}
.sp
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\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBDataiterator Dataiterator(Id\fR \fIkeyname\fR\fB, const char *\fR\fImatch\fR \fB= 0, int\fR \fIflags\fR \fB= 0)\fR
+my \fI$di\fR \fB=\fR \fI$datapos\fR\fB\->Dataiterator(\fR\fI$keyname\fR\fB,\fR \fI$match\fR\fB,\fR \fI$flags\fR\fB)\fR;
+\fIdi\fR \fB=\fR \fIdatapos\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
+\fIdi\fR \fB=\fR \fIdatapos\fR\fB\&.Dataiterator(\fR\fIkeyname\fR\fB,\fR \fImatch\fR\fB,\fR \fIflags\fR\fB)\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fBfor my\fR \fI$d\fR \fB(\fR\fI@$di\fR\fB)\fR
+\fBfor\fR \fId\fR \fBin\fR \fIdi\fR\fB:\fR
+\fBfor\fR \fId\fR \fBin\fR \fIdi\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Iterate over the matching data elements\&. See the Dataiterator class for more information\&.
.SH "AUTHOR"
.sp
Michael Schroeder <mls@suse\&.de>