.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Pinto::Repository 3pm" .TH Pinto::Repository 3pm "2014-07-20" "perl v5.18.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Pinto::Repository \- Coordinates the database, files, and indexes .SH "VERSION" .IX Header "VERSION" version 0.097 .SH "ATTRIBUTES" .IX Header "ATTRIBUTES" .SS "root" .IX Subsection "root" .SS "config" .IX Subsection "config" .SS "db" .IX Subsection "db" .SS "store" .IX Subsection "store" .SS "cache" .IX Subsection "cache" .SS "locker" .IX Subsection "locker" .SH "METHODS" .IX Header "METHODS" .SS "locate( package => );" .IX Subsection "locate( package => );" .SS "locate( distribution => );" .IX Subsection "locate( distribution => );" .ie n .SS "lock( $LOCK_TYPE )" .el .SS "lock( \f(CW$LOCK_TYPE\fP )" .IX Subsection "lock( $LOCK_TYPE )" .SS "unlock" .IX Subsection "unlock" .SS "\fIget_stack()\fP" .IX Subsection "get_stack()" .ie n .SS "get_stack( $stack_name )" .el .SS "get_stack( \f(CW$stack_name\fP )" .IX Subsection "get_stack( $stack_name )" .ie n .SS "get_stack( $stack_object )" .el .SS "get_stack( \f(CW$stack_object\fP )" .IX Subsection "get_stack( $stack_object )" .ie n .SS "get_stack( $stack_name_or_object, nocroak => 1 )" .el .SS "get_stack( \f(CW$stack_name_or_object\fP, nocroak => 1 )" .IX Subsection "get_stack( $stack_name_or_object, nocroak => 1 )" Returns the Pinto::Schema::Result::Stack object with the given \&\f(CW$stack_name\fR. If the argument is a Pinto::Schema::Result::Stack, then it just returns that. If there is no stack with such a name in the repository, throws an exception. If the \f(CW\*(C`nocroak\*(C'\fR option is true, than an exception will not be thrown and undef will be returned. If you do not specify a stack name (or it is undefined) then you'll get whatever stack is currently marked as the default stack. .PP The stack object will not be open for revision, so you will not be able to change any of the registrations for that stack. To get a stack that you can modify, use \f(CW\*(C`open_stack\*(C'\fR. .SS "\fIget_default_stack()\fP" .IX Subsection "get_default_stack()" Returns the Pinto::Schema::Result::Stack that is currently marked as the default stack in this repository. This is what you get when you call \f(CW\*(C`get_stack\*(C'\fR without any arguments. .PP The stack object will not be open for revision, so you will not be able to change any of the registrations for that stack. To get a stack that you can modify, use \f(CW\*(C`open_stack\*(C'\fR. .PP At any time, there must be exactly one default stack. This method will throw an exception if it discovers that condition is not true. .SS "\fIget_all_stacks()\fP" .IX Subsection "get_all_stacks()" Returns a list of all the Pinto::Schema::Result::Stack objects in the repository. You can sort them as strings (by name) or numerically (by last modification time). .SS "get_revision($commit)" .IX Subsection "get_revision($commit)" .ie n .SS "get_package( spec => $pkg_spec )" .el .SS "get_package( spec => \f(CW$pkg_spec\fP )" .IX Subsection "get_package( spec => $pkg_spec )" Returns a representing the latest version of the package in the repository with the same name as the package spec \fBand the same or higher version\fR as the package spec. See Pinto::PackageSpec for the definition of a package spec. .ie n .SS "get_package( name => $pkg_name )" .el .SS "get_package( name => \f(CW$pkg_name\fP )" .IX Subsection "get_package( name => $pkg_name )" Returns a representing the latest version of the package in the repository with the given \f(CW$pkg_name\fR. If there is no such package with that name in the repository, returns nothing. .ie n .SS "get_package( name => $pkg_name, path => $dist_path )" .el .SS "get_package( name => \f(CW$pkg_name\fP, path => \f(CW$dist_path\fP )" .IX Subsection "get_package( name => $pkg_name, path => $dist_path )" Returns the with the given \&\f(CW$pkg_name\fR that belongs to the distribution identified by \&\f(CW$dist_path\fR. If there is no such package in the repository, returns nothing. .ie n .SS "get_distribution( spec => $pkg_spec )" .el .SS "get_distribution( spec => \f(CW$pkg_spec\fP )" .IX Subsection "get_distribution( spec => $pkg_spec )" Given a Pinto::PackageSpec, returns the Pinto::Schema::Result::Distribution that contains the \fBlatest version of the package\fR in this repository with the same name as the spec \fBand the same or higher version as the spec\fR. Returns nothing if no such distribution is found. .ie n .SS "get_distribution( spec => $dist_spec )" .el .SS "get_distribution( spec => \f(CW$dist_spec\fP )" .IX Subsection "get_distribution( spec => $dist_spec )" Given a Pinto::DistributionSpec, returns the Pinto::Schema::Result::Distribution from this repository with the same author id and archive attributes as the spec. Returns nothing if no such distribution is found. .ie n .SS "get_distribution( path => $dist_path )" .el .SS "get_distribution( path => \f(CW$dist_path\fP )" .IX Subsection "get_distribution( path => $dist_path )" Given a distribution path, (for example \f(CW\*(C`AUTHOR/Dist\-1.0.tar.gz\*(C'\fR or \f(CW\*(C`A/AU/AUTHOR/Dist\-1.0.tar.gz\*(C'\fR returns the Pinto::Schema::Result::Distribution from this repository that is identified by the author \s-1ID\s0 and archive file name in the path. Returns nothing if no such distribution is found. .ie n .SS "get_distribution( author => $author, archive => $archive )" .el .SS "get_distribution( author => \f(CW$author\fP, archive => \f(CW$archive\fP )" .IX Subsection "get_distribution( author => $author, archive => $archive )" Given an author id and a distribution archive file basename, returns the Pinto::Schema::Result::Distribution from this repository with those attributes. Returns nothing if no such distribution exists. .ie n .SS "ups_distribution( spec => $pkg_spec )" .el .SS "ups_distribution( spec => \f(CW$pkg_spec\fP )" .IX Subsection "ups_distribution( spec => $pkg_spec )" Given a Pinto::PackageSpec, locates the distribution that contains the latest version of the package across all upstream repositories with the same name as the spec, and the same or higher version as the spec. If such distribution is found, it is fetched and added to this repository. If it is not found, then an exception is thrown. .ie n .SS "ups_distribution( spec => $dist_spec )" .el .SS "ups_distribution( spec => \f(CW$dist_spec\fP )" .IX Subsection "ups_distribution( spec => $dist_spec )" Given a Pinto::DistributionSpec, locates the first distribution in any upstream repository with the same author and archive as the spec. If such distribution is found, it is fetched and added to this repository. If it is not found, then an exception is thrown. .ie n .SS "add( archive => $path, author => $id )" .el .SS "add( archive => \f(CW$path\fP, author => \f(CW$id\fP )" .IX Subsection "add( archive => $path, author => $id )" .ie n .SS "add( archive => $path, author => $id, source => $url )" .el .SS "add( archive => \f(CW$path\fP, author => \f(CW$id\fP, source => \f(CW$url\fP )" .IX Subsection "add( archive => $path, author => $id, source => $url )" Adds the distribution archive located on the local filesystem at \&\f(CW$path\fR to the repository in the author directory for the author with \&\f(CW$id\fR. The packages provided by the distribution will be indexed, and the prerequisites will be recorded. If the \f(CW\*(C`source\*(C'\fR is specified, it must be the \s-1URL\s0 to the root of the repository where the distribution came from. Otherwise, the \f(CW\*(C`source\*(C'\fR defaults to \&\f(CW\*(C`LOCAL\*(C'\fR. Returns a Pinto::Schema::Result::Distribution object representing the newly added distribution. .ie n .SS "fetch_distribution( url => $url )" .el .SS "fetch_distribution( url => \f(CW$url\fP )" .IX Subsection "fetch_distribution( url => $url )" Fetches a distribution archive from a remote \s-1URL\s0 and adds it to this repository. The packages provided by the distribution will be indexed, and the prerequisites will be recorded. Returns a Pinto::Schema::Result::Distribution object representing the fetched distribution. .SS "\fIclean_files()\fP" .IX Subsection "clean_files()" Deletes all distribution archives that are on the filesystem but not in the database. This can happen when an Action fails or is aborted prematurely. .SH "AUTHOR" .IX Header "AUTHOR" Jeffrey Ryan Thalhammer .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2013 by Jeffrey Ryan Thalhammer. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.