diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-10-27 14:54:32 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-10-27 14:54:33 +0900 |
commit | 9d82811ac90c5db61fca60e3e7c95ba58bc66393 (patch) | |
tree | 14fd1327bfb65babc5a84f7c719eb3c723035b6b /doc | |
parent | 1a93853889c819ac2d3c8e83e856f4775e664b00 (diff) | |
download | libsolv-9d82811ac90c5db61fca60e3e7c95ba58bc66393.tar.gz libsolv-9d82811ac90c5db61fca60e3e7c95ba58bc66393.tar.bz2 libsolv-9d82811ac90c5db61fca60e3e7c95ba58bc66393.zip |
Imported Upstream version 0.6.12upstream/0.6.12
Change-Id: I57ee1847c5c25f2602e0348213fa145f97cc3434
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/appdata2solv.1 | 4 | ||||
-rw-r--r-- | doc/archpkgs2solv.1 | 4 | ||||
-rw-r--r-- | doc/archrepo2solv.1 | 4 | ||||
-rw-r--r-- | doc/comps2solv.1 | 4 | ||||
-rw-r--r-- | doc/deb2solv.1 | 4 | ||||
-rw-r--r-- | doc/deltainfoxml2solv.1 | 4 | ||||
-rw-r--r-- | doc/dumpsolv.1 | 4 | ||||
-rwxr-xr-x | doc/filters/xcode.pl | 6 | ||||
-rw-r--r-- | doc/helix2solv.1 | 4 | ||||
-rw-r--r-- | doc/installcheck.1 | 4 | ||||
-rw-r--r-- | doc/libsolv-bindings.3 | 150 | ||||
-rw-r--r-- | doc/libsolv-bindings.txt | 82 | ||||
-rw-r--r-- | doc/libsolv-constantids.3 | 4 | ||||
-rw-r--r-- | doc/libsolv-history.3 | 4 | ||||
-rw-r--r-- | doc/libsolv-pool.3 | 4 | ||||
-rw-r--r-- | doc/libsolv.3 | 4 | ||||
-rw-r--r-- | doc/mdk2solv.1 | 4 | ||||
-rw-r--r-- | doc/mergesolv.1 | 4 | ||||
-rw-r--r-- | doc/repomdxml2solv.1 | 4 | ||||
-rw-r--r-- | doc/rpmdb2solv.1 | 4 | ||||
-rw-r--r-- | doc/rpmmd2solv.1 | 4 | ||||
-rw-r--r-- | doc/rpms2solv.1 | 4 | ||||
-rw-r--r-- | doc/susetags2solv.1 | 4 | ||||
-rw-r--r-- | doc/testsolv.1 | 4 | ||||
-rw-r--r-- | doc/updateinfoxml2solv.1 | 4 |
25 files changed, 271 insertions, 55 deletions
diff --git a/doc/appdata2solv.1 b/doc/appdata2solv.1 index 174e25e..b5fdf9f 100644 --- a/doc/appdata2solv.1 +++ b/doc/appdata2solv.1 @@ -2,12 +2,12 @@ .\" Title: appdata2solv .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/> -.\" Date: 09/25/2014 +.\" Date: 08/26/2015 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "APPDATA2SOLV" "1" "09/25/2014" "libsolv" "LIBSOLV" +.TH "APPDATA2SOLV" "1" "08/26/2015" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/archpkgs2solv.1 b/doc/archpkgs2solv.1 index e4ef62d..6052aee 100644 --- a/doc/archpkgs2solv.1 +++ b/doc/archpkgs2solv.1 @@ -2,12 +2,12 @@ .\" Title: archpkgs2solv .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/> -.\" Date: 09/25/2014 +.\" Date: 08/26/2015 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "ARCHPKGS2SOLV" "1" "09/25/2014" "libsolv" "LIBSOLV" +.TH "ARCHPKGS2SOLV" "1" "08/26/2015" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/archrepo2solv.1 b/doc/archrepo2solv.1 index 4987821..94f5c41 100644 --- a/doc/archrepo2solv.1 +++ b/doc/archrepo2solv.1 @@ -2,12 +2,12 @@ .\" Title: archrepo2solv .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/> -.\" Date: 09/25/2014 +.\" Date: 08/26/2015 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "ARCHREPO2SOLV" "1" "09/25/2014" "libsolv" "LIBSOLV" +.TH "ARCHREPO2SOLV" "1" "08/26/2015" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/comps2solv.1 b/doc/comps2solv.1 index e8ec2f7..c6f8d32 100644 --- a/doc/comps2solv.1 +++ b/doc/comps2solv.1 @@ -2,12 +2,12 @@ .\" Title: comps2solv .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/> -.\" Date: 09/25/2014 +.\" Date: 08/26/2015 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "COMPS2SOLV" "1" "09/25/2014" "libsolv" "LIBSOLV" +.TH "COMPS2SOLV" "1" "08/26/2015" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/deb2solv.1 b/doc/deb2solv.1 index 4cfa093..95f5091 100644 --- a/doc/deb2solv.1 +++ b/doc/deb2solv.1 @@ -2,12 +2,12 @@ .\" Title: deb2solv .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/> -.\" Date: 09/25/2014 +.\" Date: 08/26/2015 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "DEB2SOLV" "1" "09/25/2014" "libsolv" "LIBSOLV" +.TH "DEB2SOLV" "1" "08/26/2015" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/deltainfoxml2solv.1 b/doc/deltainfoxml2solv.1 index 844c4fb..11cda74 100644 --- a/doc/deltainfoxml2solv.1 +++ b/doc/deltainfoxml2solv.1 @@ -2,12 +2,12 @@ .\" Title: deltainfoxml2solv .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/> -.\" Date: 09/24/2014 +.\" Date: 08/26/2015 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "DELTAINFOXML2SOLV" "1" "09/24/2014" "libsolv" "LIBSOLV" +.TH "DELTAINFOXML2SOLV" "1" "08/26/2015" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/dumpsolv.1 b/doc/dumpsolv.1 index 3e1400e..cb6a136 100644 --- a/doc/dumpsolv.1 +++ b/doc/dumpsolv.1 @@ -2,12 +2,12 @@ .\" Title: dumpsolv .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/> -.\" Date: 09/22/2014 +.\" Date: 08/26/2015 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "DUMPSOLV" "1" "09/22/2014" "libsolv" "LIBSOLV" +.TH "DUMPSOLV" "1" "08/26/2015" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/filters/xcode.pl b/doc/filters/xcode.pl index 54b4080..089f511 100755 --- a/doc/filters/xcode.pl +++ b/doc/filters/xcode.pl @@ -35,7 +35,11 @@ while(<STDIN>) { if (!/^[a-zA-Z0-9_]+$/) { $_ = " $_"; $_ = "$_ "; - s/(?<=[^a-zA-Z_\&:\.\'\";])(?!solv\W|Solv\W|Pool\W)([\$\@a-zA-Z_][a-zA-Z0-9_]*)(?=[^a-zA-Z0-9_\(;\[])(?!::)(?! [^=])/<-S><I>$1<-I><S>/g; + if (s/^ TCL +/ /) { + s/(\$[a-zA-Z_][a-zA-Z0-9_]*)/<-S><I>$1<-I><S>/g; + } else { + s/(?<=[^a-zA-Z_\&:\.\'\";])(?!solv\W|Solv\W|Pool\W)([\$\@a-zA-Z_][a-zA-Z0-9_]*)(?=[^a-zA-Z0-9_\(;\[])(?!::)(?! [^=])/<-S><I>$1<-I><S>/g; + } # fixup for perl bare words s/{<-S><I>([a-zA-Z_][a-zA-Z0-9]*)<-I><S>}/{$1}/g; # fixup for callbackfunctions diff --git a/doc/helix2solv.1 b/doc/helix2solv.1 index 5a8d678..900482f 100644 --- a/doc/helix2solv.1 +++ b/doc/helix2solv.1 @@ -2,12 +2,12 @@ .\" Title: helix2solv .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/> -.\" Date: 09/24/2014 +.\" Date: 08/26/2015 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "HELIX2SOLV" "1" "09/24/2014" "libsolv" "LIBSOLV" +.TH "HELIX2SOLV" "1" "08/26/2015" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/installcheck.1 b/doc/installcheck.1 index 85e4d89..7ee3e4d 100644 --- a/doc/installcheck.1 +++ b/doc/installcheck.1 @@ -2,12 +2,12 @@ .\" Title: installcheck .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/> -.\" Date: 09/22/2014 +.\" Date: 08/26/2015 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "INSTALLCHECK" "1" "09/22/2014" "libsolv" "LIBSOLV" +.TH "INSTALLCHECK" "1" "08/26/2015" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/libsolv-bindings.3 b/doc/libsolv-bindings.3 index 1f52285..9fe26c1 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 <http://docbook.sf.net/> -.\" Date: 09/29/2014 +.\" Date: 08/28/2015 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "LIBSOLV\-BINDINGS" "3" "09/29/2014" "libsolv" "LIBSOLV" +.TH "LIBSOLV\-BINDINGS" "3" "08/28/2015" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -312,6 +312,99 @@ Note that boolean methods have an added trailing \(lq?\(rq, to be consistent wit .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\fR\fB::Pool_POOL_FLAG_OBSOLETEUSESCOLORS 1\fR +\fBputs [\fR\fI$solvable\fR \fBlookup_str\fR \fI$solv\fR\fB::SOLVABLE_SUMMARY]\fR +.fi +.if n \{\ +.RE +.\} .SH "THE SOLV CLASS" .sp This is the main namespace of the library, you cannot create objects of this type but it contains some useful constants\&. @@ -916,6 +1009,21 @@ Get/Set fixed jobs stored in the pool\&. Those jobs are automatically appended t .\} .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\&. +.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, @@ -4892,7 +5000,22 @@ my \fI$chksum\fR \fB= solv::Chksum\->new(\fR\fI$type\fR\fB,\fR \fI$hex\fR\fB)\fR .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 \{\ @@ -4924,7 +5047,7 @@ Return the type of the checksum object\&. .RE .\} .sp -Add a string to the checksum\&. +Add a (binary) string to the checksum\&. .sp .if n \{\ .RS 4 @@ -5077,7 +5200,7 @@ my \fI$file\fR \fB= solv::xfopen_fd(\fR\fI$path\fR\fB,\fR \fI$fileno\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 \{\ @@ -5099,6 +5222,21 @@ Return file file descriptor of the file\&. If the file is not open, \-1 is retur .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 @@ -5138,7 +5276,7 @@ Flush the file\&. Returns false if there was an error\&. Flushing a closed file .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\&. diff --git a/doc/libsolv-bindings.txt b/doc/libsolv-bindings.txt index 2b51635..175d922 100644 --- a/doc/libsolv-bindings.txt +++ b/doc/libsolv-bindings.txt @@ -141,6 +141,52 @@ other ruby modules: puts "empty" if repo.isempty? +Tcl Specifics +------------- +Libsolv's tcl bindings can be loaded with the following statement: + + TCL package require solv + +Objects are either created by calling class name prefixed with ``new_'', +or they are returned by calling methods on other objects. + + TCL set pool [solv::new_Pool] + TCL set repo [$pool add_repo "my_first_repo"] + +Swig provides a ``cget'' method to read object attributes, and a +``configure'' method to write them: + + TCL $pool configure -appdata 42 + TCL puts "appdata is [$pool cget -appdata]" + +The tcl bindings provide a little helper to work with iterators in +a foreach style: + + TCL set iter [$pool solvables_iter] + TCL solv::iter s $iter { ... } + +libsolv's arrays are mapped to tcl's lists: + + TCL set jobs [list $job1 $job2] + TCL set problems [$solver solve $jobs] + TCL puts "We have [llength $problems] problems..." + +Stringification is done by calling the object's ``str'' method. + + TCL puts [$dep str] + +There is one exception: you have to use ``stringify'' for Datamatch +objects, as swig reports a clash with the ``str'' attribute. +Some objects also support a ``=='' method for equality tests, and a +``!='' method. + +Swig implements all constants as numeric variables, constants belonging +to a libsolv class are prefixed with the class name: + + TCL $pool set_flag $solv::Pool_POOL_FLAG_OBSOLETEUSESCOLORS 1 + TCL puts [$solvable lookup_str $solv::SOLVABLE_SUMMARY] + + The Solv Class -------------- This is the main namespace of the library, you cannot create objects of this @@ -532,6 +578,16 @@ 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. + /* bindings only */ + $pool->appdata_disown() + pool.appdata_disown() + pool.appdata_disown() + +Decrement the reference count of the appdata object. This can be used to break +circular references (e.g. if the pool's 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.) + === DATA RETRIEVAL METHODS === In the following functions, the _keyname_ argument describes what to retrieve. @@ -3029,7 +3085,14 @@ These keys are constants in the *solv* class. chksum = solv.Chksum(type, hex) chksum = Solv::Chksum.new(type, hex) -Create an already finalized checksum object. +Create an already finalized checksum object from a hex string. + + Chksum Chksum_from_bin(Id type, char *bin) + my $chksum = solv::Chksum->from_bin($type, $bin); + chksum = solv.Chksum.from_bin(type, bin) + chksum = Solv::Chksum.from_bin(type, bin) + +Create an already finalized checksum object from a binary checksum. === ATTRIBUTES === @@ -3047,7 +3110,7 @@ Return the type of the checksum object. chksum.add(str) chksum.add(str) -Add a string to the checksum. +Add a (binary) string to the checksum. void add_fp(FILE *fp) $chksum->add_fp($file); @@ -3132,7 +3195,8 @@ stdio library. 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. +if you want to make sure to read/write raw data. The file descriptor is dup()ed +before the file handle is created. === METHODS === @@ -3144,6 +3208,16 @@ if you want to make sure to read/write raw data. Return file file descriptor of the file. If the file is not open, `-1` is returned. + void cloexec(bool state) + $file->cloexec($state) + file.cloexec(state) + file.cloexec(state) + +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. + int dup() my $fileno = $file->dup(); fileno = file.dup() @@ -3165,7 +3239,7 @@ always returns true. file.close() file.close() -Close the file. This is needed for languages like Ruby, that do not destruct +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. diff --git a/doc/libsolv-constantids.3 b/doc/libsolv-constantids.3 index a079793..bf2230a 100644 --- a/doc/libsolv-constantids.3 +++ b/doc/libsolv-constantids.3 @@ -2,12 +2,12 @@ .\" Title: Libsolv-Constantids .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/> -.\" Date: 03/19/2015 +.\" Date: 08/26/2015 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "LIBSOLV\-CONSTANTIDS" "3" "03/19/2015" "libsolv" "LIBSOLV" +.TH "LIBSOLV\-CONSTANTIDS" "3" "08/26/2015" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/libsolv-history.3 b/doc/libsolv-history.3 index c4b33fc..872cd4e 100644 --- a/doc/libsolv-history.3 +++ b/doc/libsolv-history.3 @@ -2,12 +2,12 @@ .\" Title: Libsolv-History .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/> -.\" Date: 09/20/2013 +.\" Date: 08/26/2015 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "LIBSOLV\-HISTORY" "3" "09/20/2013" "libsolv" "LIBSOLV" +.TH "LIBSOLV\-HISTORY" "3" "08/26/2015" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/libsolv-pool.3 b/doc/libsolv-pool.3 index 1d0e84d..79d7f41 100644 --- a/doc/libsolv-pool.3 +++ b/doc/libsolv-pool.3 @@ -2,12 +2,12 @@ .\" Title: Libsolv-Pool .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/> -.\" Date: 10/09/2014 +.\" Date: 08/26/2015 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "LIBSOLV\-POOL" "3" "10/09/2014" "libsolv" "LIBSOLV" +.TH "LIBSOLV\-POOL" "3" "08/26/2015" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/libsolv.3 b/doc/libsolv.3 index da81c49..24ab788 100644 --- a/doc/libsolv.3 +++ b/doc/libsolv.3 @@ -2,12 +2,12 @@ .\" Title: Libsolv .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/> -.\" Date: 09/20/2013 +.\" Date: 08/26/2015 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "LIBSOLV" "3" "09/20/2013" "libsolv" "LIBSOLV" +.TH "LIBSOLV" "3" "08/26/2015" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/mdk2solv.1 b/doc/mdk2solv.1 index a32118a..4400c9b 100644 --- a/doc/mdk2solv.1 +++ b/doc/mdk2solv.1 @@ -2,12 +2,12 @@ .\" Title: mdk2solv .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/> -.\" Date: 09/25/2014 +.\" Date: 08/26/2015 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "MDK2SOLV" "1" "09/25/2014" "libsolv" "LIBSOLV" +.TH "MDK2SOLV" "1" "08/26/2015" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/mergesolv.1 b/doc/mergesolv.1 index e7cdd26..3ff00e8 100644 --- a/doc/mergesolv.1 +++ b/doc/mergesolv.1 @@ -2,12 +2,12 @@ .\" Title: mergesolv .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/> -.\" Date: 09/22/2014 +.\" Date: 08/26/2015 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "MERGESOLV" "1" "09/22/2014" "libsolv" "LIBSOLV" +.TH "MERGESOLV" "1" "08/26/2015" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/repomdxml2solv.1 b/doc/repomdxml2solv.1 index d00fa02..e14b974 100644 --- a/doc/repomdxml2solv.1 +++ b/doc/repomdxml2solv.1 @@ -2,12 +2,12 @@ .\" Title: repomdxml2solv .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/> -.\" Date: 09/24/2014 +.\" Date: 08/26/2015 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "REPOMDXML2SOLV" "1" "09/24/2014" "libsolv" "LIBSOLV" +.TH "REPOMDXML2SOLV" "1" "08/26/2015" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/rpmdb2solv.1 b/doc/rpmdb2solv.1 index 5057b57..2b4b931 100644 --- a/doc/rpmdb2solv.1 +++ b/doc/rpmdb2solv.1 @@ -2,12 +2,12 @@ .\" Title: rpmdb2solv .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/> -.\" Date: 09/25/2014 +.\" Date: 08/26/2015 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "RPMDB2SOLV" "1" "09/25/2014" "libsolv" "LIBSOLV" +.TH "RPMDB2SOLV" "1" "08/26/2015" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/rpmmd2solv.1 b/doc/rpmmd2solv.1 index 249d801..2d8e245 100644 --- a/doc/rpmmd2solv.1 +++ b/doc/rpmmd2solv.1 @@ -2,12 +2,12 @@ .\" Title: rpmmd2solv .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/> -.\" Date: 09/24/2014 +.\" Date: 08/26/2015 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "RPMMD2SOLV" "1" "09/24/2014" "libsolv" "LIBSOLV" +.TH "RPMMD2SOLV" "1" "08/26/2015" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/rpms2solv.1 b/doc/rpms2solv.1 index c6a2725..e67c6ef 100644 --- a/doc/rpms2solv.1 +++ b/doc/rpms2solv.1 @@ -2,12 +2,12 @@ .\" Title: rpms2solv .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/> -.\" Date: 09/24/2014 +.\" Date: 08/26/2015 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "RPMS2SOLV" "1" "09/24/2014" "libsolv" "LIBSOLV" +.TH "RPMS2SOLV" "1" "08/26/2015" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/susetags2solv.1 b/doc/susetags2solv.1 index 9ec9510..9b07094 100644 --- a/doc/susetags2solv.1 +++ b/doc/susetags2solv.1 @@ -2,12 +2,12 @@ .\" Title: susetags2solv .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/> -.\" Date: 09/24/2014 +.\" Date: 08/26/2015 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "SUSETAGS2SOLV" "1" "09/24/2014" "libsolv" "LIBSOLV" +.TH "SUSETAGS2SOLV" "1" "08/26/2015" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/testsolv.1 b/doc/testsolv.1 index faf97b6..0e71874 100644 --- a/doc/testsolv.1 +++ b/doc/testsolv.1 @@ -2,12 +2,12 @@ .\" Title: testsolv .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/> -.\" Date: 09/22/2014 +.\" Date: 08/26/2015 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "TESTSOLV" "1" "09/22/2014" "libsolv" "LIBSOLV" +.TH "TESTSOLV" "1" "08/26/2015" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/updateinfoxml2solv.1 b/doc/updateinfoxml2solv.1 index 03c5cc7..20ab3ad 100644 --- a/doc/updateinfoxml2solv.1 +++ b/doc/updateinfoxml2solv.1 @@ -2,12 +2,12 @@ .\" Title: updateinfoxml2solv .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/> -.\" Date: 09/24/2014 +.\" Date: 08/26/2015 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "UPDATEINFOXML2SOLV" "1" "09/24/2014" "libsolv" "LIBSOLV" +.TH "UPDATEINFOXML2SOLV" "1" "08/26/2015" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- |