Arepa

 view release on metacpan or  search on metacpan

lib/Arepa/Repository.pm  view on Meta::CPAN


=item insert_binary_package($deb_file, $distribution)

Inserts the given binary package C<$deb_file> in the repository, for the given
C<$distribution>.

=item last_cmd_output

Returns the text output of the last executed command. This can help debugging
problems.

=item get_package_list

Returns a data structure representing all the available packages in all the
known distributions. The data structure is a hash that looks like this:

 (foobar => { "lenny/main" => { "1.0-1" => ['source'] } },
  pkg2   => { "lenny/main" => { "1.0-1" => [qw(amd64 source)],
                                "1.0-2" => ['i386'], },
              "etch/contrib" =>
                              { "0.8-1" => [qw(i386 amd64 source) }
            },
  dhelp  => { "lenny/main" => { "0.6.15" => [qw(i386 source)] } },
 )

That is, the keys are the package names, and the values are another hash. This
hash has C<distribution/component> as keys, and hashes as values. These hashes
have available versions as keys, and a list of architectures as values.

=item get_source_package_information($package_name, $distro)

Returns a hash with the information for the source package with the given
C<$package_name> inside distribution C<$distro>. If there is no source package
by that name in that distribution, an empty hash will be returned.

Note that keys in the hash are lowercase.

=item get_binary_package_information($package_name, $distro, $arch)

Returns a hash with the information for the binary package with the given
C<$package_name> inside distribution C<$distro>/C<$arch>. If there is no binary
package by that name in that distribution, for that architecture, an empty hash
will be returned.

=item add_distribution(%properties)

Adds a new distribution to the repository, with whatever properties are
specified. The properties are specified in lowercase (see
C<get_distributions>) and C<codename> is mandatory. Also, you can't specify a
codename of an existing distribution, or a suite name that an existing
distribution already has. It returns 1 on success, or 0 on failure.

=item sign_distribution($dist_name)

Signs the C<Release> file for a single distribution (with codename
C<$dist_name>). It returns if GPG returned error status zero.

=item sync_remote

Syncs the local repository to the remote location, if available in the config.
Returns if the synchronisation worked (needs the C<rsync> command) or false if
there wasn't any remote repository location in the config. 

=item is_synced

Returns if the local repository is synced with the remote repository. It
returns false if there's no remote repository location in the config.

=back

=head1 SEE ALSO

C<Arepa::BuilderFarm>, C<Arepa::PackageDb>, C<Arepa::Config>.

=head1 AUTHOR

Esteban Manchado Velázquez <estebanm@opera.com>.

=head1 LICENSE AND COPYRIGHT

This code is offered under the Open Source BSD license.

Copyright (c) 2010, Opera Software. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

=over 4

=item

Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

=item

Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

=item

Neither the name of Opera Software nor the names of its contributors may
be used to endorse or promote products derived from this software without
specific prior written permission.

=back

=head1 DISCLAIMER OF WARRANTY

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.



( run in 1.317 second using v1.01-cache-2.11-cpan-39bf76dae61 )