
Youri::Package::RPM::Updater - Update RPM packages

my $updater = Youri::Package::RPM::Updater->new();
$updater->update_from_source('foo-1.0-1.src.rpm', '2.0');
$updater->update_from_spec('foo.spec', '2.0');
$updater->update_from_repository('foo', '2.0');

This module updates rpm packages. When given an explicit new version, it updates the spec file, and downloads new sources automatically. When not given a new version, it just updates the spec file.
Warning, not every spec file syntax is supported. If you use specific syntax, you'll have to ressort to additional processing with explicit perl expression to evaluate for each line of the spec file.
Here is version update algorithm (only used when building a new version):
Here is release update algorithm:
In both cases, both direct definition:
Version: X
or indirect definition:
%define version X
Version: %{version}
are supported. Any more complex one is not.

Julien Danjou <danjou@mandriva.com>
Michael Scherer <misc@mandriva.org>
Guillaume Rousse <guillomovitch@mandriva.org>

Copyright (c) 2003-2007 Mandriva.
Permission to use, copy, modify, and distribute this software and its documentation under the terms of the GNU General Public License is hereby granted. No representations are made about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. See the GNU General Public License for more details.

Creates and returns a new MDV::RPM::Updater object.
Available options:
verbosity level (default: 0).
check new version is really new before updating spec file (default: true).
rpm top-level directory (default: rpm %_topdir macro).
rpm source directory (default: rpm %_sourcedir macro).
suffix appended to numerical value in release tag. (default: none).
list of directories containing source packages (default: empty).
timeout for file downloads (default: 10)
user agent for file downloads (default: youri-package-updater/$VERSION)
alternate extensions to try when downloading source fails (default: tar.gz, tgz, zip)
mirrors to try when downloading files hosted on sourceforge (default: ovh, mesh, switch)
list of rewrite rules to apply on source tag value for computing source URL when this last one doesn't have any, as hasrefs of two regexeps
regexp of accepted content types when downloading archive files (anything matching \.(tar|gz|gzip|bz2|bzip2|lzma)$ regexp)
changelog message for new version (default: New version %%VERSION)
changelog message for new release (default: Rebuild)

Update package with name $name to version $version.
Available options:
Force package release, instead of computing it.
download new sources (default: true).
update spec file revision (release/history) (default: true).
update spec file changelog (default: true).
callback to execute as filter for each spec file line (default: none).
perl expression (or list of expressions) to evaluate for each spec file line (default: none). Takes precedence over previous option.
list of changelog entries (default: empty).
Update package with source file $source to version $version.
See update_from_repository() for available options.
Update package with spec file $spec to version $version.
See update_from_repository() for available options.