OpenNMS::Release::YumRepo(3pm)

NAME
OpenNMS::Release::YumRepo - Perl extension that represents a YUM repository

SYNOPSIS
  use OpenNMS::Release::YumRepo;

DESCRIPTION
This represents an individual YUM repository, i.e., a directory in which you would run "createrepo".

Repositories are expected to be in the form:

  C<base>/C<platform>/C<repository>

They may optionally have subdirectories under the repository, which will be preserved when sharing RPMs between repositories.

CONSTRUCTOR
OpenNMS::Yum::Repo->new($base, $release, $platform);

Create a new Repo object. You can add and remove RPMs to/from it, re-index it, and so on.

base - the top-level path for the repository
release - the name of the release, e.g., "snapshot", "testing", etc.
platform - the platform for the release, e.g., "rhel5", "common", etc.

METHODS

  * find_repos($base)
Search for repositories, given a base path. Returns a list of OpenNMS::Release::YumRepo objects representing the repositories found.

  * release
The 'release' of the repository, e.g., "stable", "testing", etc. This is expected to be a subdirectory immediately under the base directory.

  * platform
The 'platform' or OS of the repository, e.g., "rhel5", "fc15", "common". This is expected to be a subdirectory immediately under the release directory.

  * path
The path of the repository (base + release + platform).

  * releasedir
The path of the release directory (base + release).

  * to_string
A convenient way of displaying the repository.

  * delete
Delete the repository from the filesystem.

  * replace
Given a target repository, replace the target repository with the contents of the current repository.

  * index({options})
Create the YUM indexes for this repository.

Takes as argument a hash reference containing optional configuration.

Supported options:

•   signing_id - the GPG ID to sign the repository index as.

•   signing_password - the GPG password to sign the repository index with.

If either of the signing options are not passed, we do not sign the repository.

AUTHOR
Benjamin Reed <ranger@opennms.org> Matt Brozowski <brozow@opennms.org>

COPYRIGHT AND LICENSE
Copyright (C) 2012 by The OpenNMS Group, Inc.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.