The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

MDV::Distribconf::Build - Subclass to MDV::Distribconf to build configuration

METHODS

MDV::Distribconf::Build->new($root_of_distrib)

Returns a new MDV::Distribconf::Build object.

$distrib->init($flavour)

Create initals directories in the distrib tree if missing.

$flavour is either 'mandriva' or 'mandrake', depending the tree type you want to create.

See also "settree" in MDV::Distribconf

Return 1 on success, 0 otherwise.

$distrib->create_media($media)

Create a media $media if not exists and its directories if need.

See also setvalue

Return 1 on success, 0 otherwise

$distrib->setvalue($media, $var, $val)

Sets or adds $var parameter from $media to $val. If $media doesn't exist, it is implicitly created. If $var is undef, a new media is created with no defined parameters.

$distrib->delvalue($media, $var)

Delete $var parameter from $media. If $var is not specified, the media is is deleted. If $media is not specified, $var is remove from global settings.

$distrib->write_hdlists($hdlists)

Writes the hdlists file to $hdlists, or if no parameter is given, in the media information directory. $hdlists can be a file path or a file handle. Returns 1 on success, 0 on error.

$distrib->write_mediacfg($mediacfg)

Write the media.cfg file into the media information directory, or into the $mediacfg given as argument. $mediacfg can be a file path, or a glob reference (\*STDOUT for example).

Returns 1 on success, 0 on error.

$distrib->write_version($version)

Write the VERSION file. Returns 0 on error, 1 on success.

$distrib->write_productid($productid)

Write the productid file. Returns 0 on error, 1 on success.

$distrib->list_existing_medias()

List media which really exists on the disk

$distrib->set_medias_size($media)

Set media size into media.cfg for $media

$distrib->set_all_medias_size()

Set media size into media.cfg

SEE ALSO

MDV::Distribconf

AUTHOR

Olivier Thauvin <nanardon@mandriva.org>

LICENSE AND COPYRIGHT

(c) 2005, 2006, 2007 Olivier Thauvin (c) 2005, 2006, 2007 Mandriva

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.