NAME

MDV::Repsys::Remote

SYNOPSYS

Module to access and build rpm from a svn

FUNCTIONS

new(%options)

Create a new MDV::Repsys::Remote object

options:

configfile

Use this repsys configuration file instead /etc/repsys.conf

nocommit

Disable commit action, usefull for testing purpose

last_error

Return the last error message after a failure.

set_verbosity($level)

Set the verbosity verbosity of the module:

0 silent
1 progress message
2 debug message

get_pkgurl_parent($pkgname, %options)

Return the parent svn url location for package named $pkgname

get_pkgname_from_wc

Return the package name from current working copy

get_pkgurl($pkgname, %options)

Return the svn url location for package named $pkgname

checkout_pkg($pkgname, $destdir, %options)

Checkout a package from svn into $destdir directory

get_old_changelog($pkgname, $handle, %options)

Read old changelog entry from svn and write it into $handle. If not specified, $handle is set to STDOUT.

log_pkg($pkgname, $handle, %options)

Build a log from svn and print it into $handle. If not specified, $handle is set to STDOUT.

build_final_changelog($pkgname, $handle, %options)

Build the complete changelog for a package and print it into $handle. If not specified, $handle is set to STDOUT.

get_final_spec_fd($pecfile, $fh, %options)

Generated the final specfile from $pecfile into $fh filehandle.

get_final_spec($specfile, %options)

Build the final changelog for upload from $specfile.

$options{pkgname} is the package name, if not specified, it is evaluate from the specfile.

The new specfile will generated into $options{specfile} is specified, otherwise a file with same name is create into $options{destdir}.

The module is safe, the source and destination can be the same file, the content will be replaced.

if $options{destdir} is not specified, a temporary directory is created. This directory will be trashed on MDV::Repsys::Remote object destruction. So this kind of code will not work:

my $o = MDV::Repsys::Remote->new();
my $newspec = $o->get_final_spec($specfile);
$o = undef;
do_something_with($newspecfile); # the directory has been deleted

Notice this kind of code produce a warning.

get_pkg_lastrev($pkgname, %options)

Return the real last revision change for a package.

get_dir_lastrev($dir, %options)

Return the real last revision change for package checkout into $dir.

get_srpm($pkgname, %options)

Build the final src.rpm from the svn. Return the svn revision and the src.rpm location.

create_pkg($pkgname)

Create a package directory on the svn.

import_pkg($rpmfile, %options)

Import a source package into the svn.

splitchangelog($specfile, %options)

Strip the changelog from a specfile and commit it into the svn.

commit($dir, %options)

Synchronize sources found into the spec and commit files into the svn.

tag_pkg($pkgname, %options)

TAG a package into the svn, aka copy the current tree into VERSION/RELEASE/. The operation is done directly into the svn.

get_pkg_info($pkgname, %options)

Return a hash containing usefull information about $pkgname:

pkgname

The name of the package

size

The size of the package (sum of files size)

last_rev

The revision of the last changed

last_author

The author of the last change

last_time

The time of last change (integer value, use loacaltime to have a human readable value)

submit($pkgname, %options)

Submit the package on the build host.

cleanup

This module creates a number of temporary directories; all are deleted when the program terminates, but with this function you can force a removal of these directories.

FUNCTION OPTIONS

revision

Work on this revision from the svn

destdir

Extract files into this directories instead a temporary directory.

AUTHORS

Olivier Thauvin <nanardon@mandriva.org>

SEE ALSO

Repsys