summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2013-06-14 11:50:12 +0200
committerMichael Schroeder <mls@suse.de>2013-06-14 11:50:12 +0200
commitcb3836353d190ef3ce45778d29038d001f5b29b8 (patch)
tree0f9e0c378cbbea3fc471de11500f5004d7b4359e /doc
parent8243f6d9275395544baa614e8788596fb11c5d34 (diff)
downloadlibsolv-cb3836353d190ef3ce45778d29038d001f5b29b8.tar.gz
libsolv-cb3836353d190ef3ce45778d29038d001f5b29b8.tar.bz2
libsolv-cb3836353d190ef3ce45778d29038d001f5b29b8.zip
bindings: add pool.errstr, make add_rpm/... return Solvable objects
Diffstat (limited to 'doc')
-rw-r--r--doc/libsolv-bindings.389
-rw-r--r--doc/libsolv-bindings.txt77
2 files changed, 94 insertions, 72 deletions
diff --git a/doc/libsolv-bindings.3 b/doc/libsolv-bindings.3
index 3ac85c6..c29315f 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.76.1 <http://docbook.sf.net/>
-.\" Date: 06/13/2013
+.\" Date: 06/14/2013
.\" Manual: LIBSOLV
.\" Source: libsolv
.\" Language: English
.\"
-.TH "LIBSOLV\-BINDINGS" "3" "06/13/2013" "libsolv" "LIBSOLV"
+.TH "LIBSOLV\-BINDINGS" "3" "06/14/2013" "libsolv" "LIBSOLV"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -452,6 +452,21 @@ Look up a Repository by its id\&.
.\}
.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
@@ -1685,9 +1700,9 @@ Add a single empty solvable to the repository\&. Returns a Solvable object, see
.\}
.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
@@ -1698,9 +1713,9 @@ Add a single empty solvable to the repository\&. Returns a Solvable object, see
.\}
.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
@@ -1713,9 +1728,9 @@ Read a \(lqsolv\(rq file and add its contents to the repository\&. These files c
.\}
.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
@@ -1726,9 +1741,9 @@ Read a \(lqsolv\(rq file and add its contents to the repository\&. These files c
.\}
.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
@@ -1740,10 +1755,10 @@ Add the contents of the rpm database to the repository\&. If a solv file contain
.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
@@ -1770,10 +1785,10 @@ Add all pubkeys contained in the rpm database to the repository\&. Note that new
.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
@@ -1786,9 +1801,9 @@ Add a pubkey from a file to the repository\&.
.\}
.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
@@ -1875,10 +1890,10 @@ Add the contents of the debian repository metadata (the "packages" file) to the
.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
@@ -1892,8 +1907,8 @@ Add the metadata of a single deb package to the repository\&.
.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
@@ -1907,8 +1922,8 @@ Add the contents of the mageia/mandriva repository metadata (the "synthesis\&.hd
.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
@@ -1922,8 +1937,8 @@ Extend the packages from the synthesis file with the info\&.xml and files\&.xml
.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
@@ -1937,8 +1952,8 @@ Add the contents of the archlinux repository metadata (the "\&.db\&.tar" file) t
.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
diff --git a/doc/libsolv-bindings.txt b/doc/libsolv-bindings.txt
index e190cb3..8d273ff 100644
--- a/doc/libsolv-bindings.txt
+++ b/doc/libsolv-bindings.txt
@@ -235,6 +235,13 @@ Look up a Repository by its id.
Define which repository contains all the installed packages.
+ const char *errstr; /* read only */
+ my $err = $pool->{errstr};
+ err = pool.errstr
+ err = pool.errstr
+
+Return the last error string that was stored in the pool.
+
=== CONSTANTS ===
*POOL_FLAG_PROMOTEEPOCH*::
@@ -965,37 +972,37 @@ Add a single empty solvable to the repository. Returns a Solvable object, see
the Solvable class for more information.
bool add_solv(const char *name, int flags = 0)
- $repo->add_solv($name, $flags);
- repo.add_solv(name, flags)
- repo.add_solv(name, flags)
+ $repo->add_solv($name);
+ repo.add_solv(name)
+ repo.add_solv(name)
bool add_solv(FILE *fp, int flags = 0)
- $repo->add_solv($fp, $flags);
- repo.add_solv(fp, flags)
- repo.add_solv(fp, flags)
+ $repo->add_solv($fp);
+ repo.add_solv(fp)
+ repo.add_solv(fp)
Read a ``solv'' file and add its contents to the repository. These files can be
written with the write() method and are normally used as fast cache for
repository metadata.
bool add_rpmdb(int flags = 0)
- $repo->add_rpmdb($flags);
- repo.add_rpmdb(flags)
- repo.add_rpmdb(flags)
+ $repo->add_rpmdb();
+ repo.add_rpmdb()
+ repo.add_rpmdb()
bool add_rpmdb_reffp(FILE *reffp, int flags = 0)
- $repo->add_rpmdb_reffp($reffp, $flags);
- repo.add_rpmdb_reffp($reffp, flags)
- repo.add_rpmdb_reffp($reffp, flags)
+ $repo->add_rpmdb_reffp($reffp);
+ repo.add_rpmdb_reffp(reffp)
+ repo.add_rpmdb_reffp(reffp)
Add the contents of the rpm database to the repository. If a solv file
containing an old version of the database is available, it can be passed as
reffp to speed up reading.
- bool add_rpm(const char *name, int flags = 0)
- $repo->add_rpm($name, $flags);
- repo.add_rpm(name, flags)
- repo.add_rpm(name, flags)
+ Solvable add_rpm(const char *filename, int flags = 0)
+ my $solvable = $repo->add_rpm($filename);
+ solvable = repo.add_rpm(filename)
+ solvable = repo.add_rpm(filename)
Add the metadata of a single rpm package to the repository.
@@ -1008,17 +1015,17 @@ Add all pubkeys contained in the rpm database to the repository. Note that
newer rpm versions also allow to store the pubkeys in some directory instead
of the rpm database.
- bool add_pubkey(const char *keyfile, int flags = 0)
- $repo->add_pubkey($keyfile);
- repo.add_pubkey($keyfile)
- repo.add_pubkey($keyfile)
+ Solvable add_pubkey(const char *keyfile, int flags = 0)
+ my $solvable = $repo->add_pubkey($keyfile);
+ solvable = repo.add_pubkey(keyfile)
+ solvable = repo.add_pubkey(keyfile)
Add a pubkey from a file to the repository.
bool add_rpmmd(FILE *fp, const char *language, int flags = 0)
- $repo->add_rpmmd($fp, $language);
- repo.add_rpmmd(fp, language)
- repo.add_rpmmd(fp, language)
+ $repo->add_rpmmd($fp, undef);
+ repo.add_rpmmd(fp, None)
+ repo.add_rpmmd(fp, nil)
Add metadata stored in the "rpm-md" format (i.e. from files in the ``repodata''
directory) to a repository. Supported files are "primary", "filelists",
@@ -1070,41 +1077,41 @@ Add the contents of the debian installed package database to the repository.
Add the contents of the debian repository metadata (the "packages" file)
to the repository.
- bool add_deb(const char *filename, int flags = 0)
- $repo->add_deb($filename);
- repo.add_deb(filename)
- repo.add_deb(filename)
+ Solvable add_deb(const char *filename, int flags = 0)
+ my $solvable = $repo->add_deb($filename);
+ solvable = repo.add_deb(filename)
+ solvable = repo.add_deb(filename)
Add the metadata of a single deb package to the repository.
bool add_mdk(FILE *fp, int flags = 0)
$repo->add_mdk($fp);
- repo.add_mdk($fp)
- repo.add_mdk($fp)
+ repo.add_mdk(fp)
+ repo.add_mdk(fp)
Add the contents of the mageia/mandriva repository metadata (the
"synthesis.hdlist" file) to the repository.
bool add_mdk_info(FILE *fp, int flags = 0)
$repo->add_mdk($fp);
- repo.add_mdk($fp)
- repo.add_mdk($fp)
+ repo.add_mdk(fp)
+ repo.add_mdk(fp)
Extend the packages from the synthesis file with the info.xml and files.xml
data. Do not forget to specify *REPO_EXTEND_SOLVABLES*.
bool add_arch_repo(FILE *fp, int flags = 0)
$repo->add_arch_repo($fp);
- repo.add_arch_repo($fp)
- repo.add_arch_repo($fp)
+ repo.add_arch_repo(fp)
+ repo.add_arch_repo(fp)
Add the contents of the archlinux repository metadata (the ".db.tar" file) to
the repository.
bool add_arch_local(const char *dir, int flags = 0)
$repo->add_arch_local($dir);
- repo.add_arch_local($dir)
- repo.add_arch_local($dir)
+ repo.add_arch_local(dir)
+ repo.add_arch_local(dir)
Add the contents of the archlinux installed package database to the repository.
The _dir_ parameter is usually set to "/var/lib/pacman/local".