X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=doc%2Flibsolv-bindings.3;h=1f52285162061f1782eb640d9f51c95c5d37d686;hb=ef6e8f8da0690f0e11c12eff0f6e7fa97c109d54;hp=dd7519f529afac21c9eaa7b1c4260df1b94beceb;hpb=f6ec0181558e1a637a90b8b165403d24c93fab90;p=platform%2Fupstream%2Flibsolv.git diff --git a/doc/libsolv-bindings.3 b/doc/libsolv-bindings.3 index dd7519f..1f52285 100644 --- a/doc/libsolv-bindings.3 +++ b/doc/libsolv-bindings.3 @@ -2,12 +2,12 @@ .\" Title: Libsolv-Bindings .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.78.0 -.\" Date: 03/26/2014 +.\" Date: 09/29/2014 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "LIBSOLV\-BINDINGS" "3" "03/26/2014" "libsolv" "LIBSOLV" +.TH "LIBSOLV\-BINDINGS" "3" "09/29/2014" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -307,7 +307,7 @@ Note that boolean methods have an added trailing \(lq?\(rq, to be consistent wit .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 @@ -390,7 +390,7 @@ my \fI$pool\fR \fB= solv::Pool\->new()\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 \{\ @@ -533,7 +533,22 @@ Make the addfileprovides method only add files from the standard locations (i\&. .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 betwen 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 @@ -1003,7 +1018,20 @@ Lookup functions\&. Return the data element stored in the specified solvable\&. .RS 4 .\} .nf -\fBDataiterator Dataiterator(Id\fR \fIsolvid\fR\fB, Id\fR \fIkeyname\fR\fB, const char *\fR\fImatch\fR \fB= 0, int\fR \fIflags\fR \fB= 0)\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 @@ -1024,7 +1052,7 @@ my \fI$di\fR \fB=\fR \fI$pool\fR\fB\->Dataiterator(\fR\fI$solvid\fR\fB,\fR \fI$k .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\&. @@ -1626,10 +1654,23 @@ Create a Selection consisting of all packages in the repository\&. .RS 4 .\} .nf -\fBDataiterator Dataiterator(Id\fR \fIp\fR\fB, 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$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 @@ -1647,7 +1688,7 @@ my \fI$di\fR \fB=\fR \fI$repo\fR\fB\->Dataiterator(\fR\fI$solvid\fR\fB,\fR \fI$k .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 @@ -2612,16 +2653,15 @@ The solvable containing the value that was matched\&. .\} .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 @@ -2631,10 +2671,10 @@ The id of the solvable that matched\&. .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 @@ -2646,10 +2686,10 @@ The keyname that matched, either as id or string\&. .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 @@ -2659,10 +2699,10 @@ The keyname that matched, either as id or string\&. .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 @@ -2674,10 +2714,10 @@ The key type of the value that was matched, either as id or string\&. .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 @@ -2687,10 +2727,10 @@ The key type of the value that was matched, either as id or string\&. .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 @@ -2702,10 +2742,10 @@ The Id of the value that was matched (only valid for id types), either as id or .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 @@ -2717,10 +2757,10 @@ The string value that was matched (only valid for string types)\&. .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 @@ -2732,10 +2772,10 @@ The numeric value that was matched (only valid for numeric types)\&. .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 @@ -2747,6 +2787,22 @@ The secondary numeric value that was matched (only valid for types containing tw .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 @@ -3379,6 +3435,21 @@ Make the SOLVER_FORCEBEST job option consider only packages that meet the polici .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 @@ -3387,9 +3458,9 @@ Basic rule types: 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 @@ -3429,47 +3500,47 @@ These rules are generated by the solver to keep it from running into the same pr .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 @@ -4934,6 +5005,21 @@ Finalize the checksum and return the result as hex string\&. .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\fR \fBif (\fR\fI$chksum1\fR \fB==\fR \fI$chksum2\fR\fB)\fR \fBif\fR \fIchksum1\fR \fB==\fR \fIchksum2\fR\fB:\fR