Arepa::BuilderFarm - Arepa builder farm access class
my $repo = Arepa::BuilderFarm->new('path/to/config.yml'); my $repo = Arepa::BuilderFarm->new('path/to/config.yml', builder_config_dir => 'path/to/builderconf'); $repo->last_build_log; $repo->package_db; my %config = $repo->get_builder_config($builder_name); my $module_name = $repo->builder_type_module($type); my $module_name = $repo->builder_module($builder_name); my $builder = $repo->builder($builder_name); $repo->init_builders; $repo->init_builder($builder_name); $repo->uninit_builders; $repo->uninit_builder($builder_name); my $r = $repo->compile_package_from_dsc($builder_name, $dsc_file, %opts); my $r = $repo->compile_package_from_queue($builder_name, $request_id, %opts); $repo->request_package_compilation($source_id); my @arch_distro_pairs = $repo->get_compilation_targets($source_id); my @builders = $repo->get_matching_builders($architecture, $distribution); my $source_id = $repo->register_source_package(%source_package_attrs);
This class gives access to the "builder farm", to actions like initialising the builders, compiling packages and calculating which builders should compile which packages.
The builder farm uses the Arepa configuration to get the needed information.
- new($path, %options)
Creates a new builder farm access object, using the configuration file in
$path. The only valid option is
builder_config_dir(see Arepa::Config documentation for details).
Returns the output of the last compilation attempt.
Arepa::PackageDbobject pointing to the package database used by the builder farm.
Returns a hash with the configuration for the builder
Returns the module name implementing the features for the builder type
Returns the module name implementing the features for the given
Returns the builder object identified by
Initialises all the builders. It should be called once per machine boot (e.g. inside an init script).
Initialises the builder
Uninitialises all the builders. It should be called once per machine shutdown (e.g. inside an init script).
Uninitialises the builder
- compile_package_from_dsc($builder_name, $dsc_file, %opts)
Compiles the source package described by the
$dsc_fileusing the builder
$builder_name, and puts the resulting
.debfiles in the appropriate output directory. You can specify it with the
%opts. If no directory is specified, they're left in the current directory.
- bin_nmu_id($src_pkg_attrs, $builder_name)
Returns the binary NMU id that
$builder_nameshould use when building the given source package. The first parameter,
$src_pkg_attrs, is a hashref with the attributes of the source package (see
get_source_package_by_idin Arepa::PackageDb). The binNMU id is a number, or
undefif the given builder should not build the given source package as a binNMU.
- compile_package_from_queue($builder_name, $request_id, %opts)
Compiles the request
$request_idusing the builder
$builder_name, and puts the resulting
.debfiles in the output directory (by default, the current directory). The only valid option is
output_dir(to change the output directory).
Adds a compilation request for the source package with id
Returns an array of targets for the given source package
$source_id. Each target is an arrayref with two elements: architecture and distribution.
- get_matching_builders($architecture, $distribution)
Gets the builders that should compile packages for the given
$distribution. It returns a list of builder names.
Registers the source package with the given
%source_package_attrs. This method is seldom used, as you would normally add the source package to the repository first (using
Arepa::Repository), which automatically registers the source package.
- canonical_distribution($arch, $distro)
Calculates the canonical distribution, ie. the distribution as registered by one of the Arepa builders, given an architecture and distribution from a changes file or similar. It's needed for the reprepro call. If reprepro accepted "reprepro includesrc 'funnydistro' ...", having 'funnydistro' in the AlsoAcceptFor list, this wouldn't be necessary.
Esteban Manchado Velázquez <email@example.com>.
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:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
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.
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.
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.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 428:
Non-ASCII character seen before =encoding in 'Velázquez'. Assuming UTF-8