MDV::Repsys.3pm

Langue: en

Version: 2008-02-16 (mandriva - 01/05/08)

Section: 3 (Bibliothèques de fonctions)

NAME

MDV::Repsys

DESCRIPTION

Perl interface with Mandriva build system

AUTHORS

Olivier Thauvin <nanardon@mandriva.org>

Guillaume Rousse <guillomovitch@mandriva.org>

MichaA~Xl Scherer <misc@mandriva.org>

CLASS METHODS


new(%options)

Create a new MDV::Repsys object

Available options:

configfile
Use this repsys configuration file instead /etc/repsys.conf
commit true/false
Allow commit action (default: true)
submit true/fals
Allow submit action (default: true).

INSTANCE METHODS


set_verbosity($level)

Set verbosity to given level.

unpack_package($rpmfile, $destdir)


unpack_package($rpmfile, $destdir)

Unpack a source package into a directory. Return corresponding spec file.

find_current_sources($dir)

Return the list of sources (meaning: sources, icons and spec files) from the package found in given directory, according to their usage in the spec file.

find_unsync_sources($dir, @sources)


find_unsync_sources($dir, @sources)

Return two lists of files that should be added or removed from the svn repository according to their current status.

sync_sources($needadd, $needdel)


sync_sources($needadd, $needdel)

Add and remove sources from the repository.

build_package($specfile, %options)


build_package($specfile, %options)

Build package from given spec file. Return the source package, followed by the list of binary packages.

Available options:

binaries => true/false (default: true)
build binaries packages
source => true/false (default: true)
build source package
binaries_destdir $dir
create binary packages in given directory.
source_destdir $dir
create source package in given directory.
define => values
Pass each given value to underlying command, using --define switch.

get_packages_top_url()

Return the top-level svn url for packages

get_package_url($package, %options)


get_package_url($package, %options)

Return the svn url for package named $package

get_package_parent_url($package, %options)


get_package_parent_url($package, %options)

Return the svn parent url for package named $package

get_package_name_from_directory($dir)

Return the package name locate in the working directory $dir

get_package_name_from_current_directory

Return the package name from current directory

checkout_package($package, $destdir, %options)


checkout_package($package, $destdir, %options)

Checkout a package from svn into $destdir directory

Available options:

revision => $revision
Work on a specific revision.
distribution => $distribution
Work on a specific distribution tree.
branch => $branch
Work on a specific package branch inside a distribution.

print_raw_package_changelog($package, $handle, %options)


print_raw_package_changelog($package, $handle, %options)

Print the raw subversion log for package to $handle. If not specified, $handle is set to STDOUT.

print_package_changelog($package, $handle, %options)


print_package_changelog($package, $handle, %options)

Print the rpm-formated log for package to $handle. If not specified, $handle is set to STDOUT.

Available options:

revision => $revision
Work on a specific revision.
distribution => $distribution
Work on a specific distribution tree.
branch => $branch
Work on a specific package branch inside a distribution.

print_old_package_changelog($package, $handle, %options)


print_old_package_changelog($package, $handle, %options)

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

strip_changelog_from_spec($specfile)

Available options:

target => $filename
write new spec file as given filename

add_changelog_to_spec($specfile, %options)


add_changelog_to_spec($specfile, %options)

Rewrite a spec file, adding changelog from repository.

Available options:

target => $filename
write new spec file as given filename

get_last_package_revision($package, %options)


get_last_package_revision($package, %options)

Return the last revision change for a package.

get_last_directory_revision($dir, %options)


get_last_directory_revision($dir, %options)

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

extract_package($package, %options)


extract_package($package, %options)

Extract a source package from the subversion repository into the current directory. Return the package file.

Available options:

revision => $revision
Work on a specific revision.
distribution => $distribution
Work on a specific distribution tree.
branch => $branch
Work on a specific package branch inside a distribution.
destdir => $dir
Use given directory as destination.
prefix => true/false
Prefix the package file by revision number, so as to be compatible with mandriva submission tool.

create_package_directory($package, %options)


create_package_directory($package, %options)

Create a package directory on the svn.

message => $message
Use given commit message (default: ``create X'', where X is package name).

import_package($rpmfile, %options)


import_package($rpmfile, %options)

Import a source package into the svn.

message => $message
Use given commit message (default: ``import X'', where X is package name)

commit_directory($dir, %options)


commit_directory($dir, %options)

Commit a directory into the repository. Return revision number.

Available options:

message => $message
Use given commit message (default: launch interactive editor).

import_changelog($changelog, $package, %options)


import_changelog($changelog, $package, %options)

Import given changelog into the repository.

Available options:

message => $message
Use given commit message (default: ``import old changelog for X'', where X is package name)

tag_package($package, %options)


tag_package($package, %options)

Tag a package into the repository directly.

Available options:

revision => $revision
Work on a specific revision.
message => $message
Use given commit message (default: ``tag EV-R'', where E is epoch, V is version, and R is release).

get_package_info($package, %options)


get_package_info($package, %options)

Return an hashref containing useful information about given 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

Available options:

revision => $revision
Work on a specific revision.
distribution => $distribution
Work on a specific distribution tree.
branch => $branch
Work on a specific package branch inside a distribution.

submit_package($package, %options)


submit_package($package, %options)

Submit the package on the build host.

Available options:

revision => $revision
Work on a specific revision (default to last revision).
distribution => $distribution
Work on a specific distribution tree.
branch => $branch
Work on a specific package branch inside a distribution.
target => $target
Use given target as submission target (default to repsys configuration value).
define => values
Pass each given value to underlying command, using --define switch.

update_package($package, $version, %options)


update_package($package, $version, %options)

Update a package to a new version.

Available options:

revision => $revision
Work on a specific revision.
distribution => $distribution
Work on a specific distribution tree.
branch => $branch
Work on a specific package branch inside a distribution.
force-version => $version
Force given package version.
force-release => $release
Force given package release.
keep-on-failure => true/false
Keep temporary directory in case of failure
message => $message
Use given commit message (default: ``update to new version X'', where X is new version if given, ``rebuild'' otherwise)
target => $target
Use given target as submission target.

mass_update($url)

Use given URL as a list of available packages update, and call update package foreach of them

Available options:

include => $regexp
Only process package matching given regexp
exclude => $regexp
Don't process package matching given regexp
keep-on-failure => true/false
Keep temporary directories in case of failure