<<

NAME

Youri::Package - Abstract package class

DESCRIPTION

This abstract class defines Youri::Package interface.

CLASS METHODS

new(%args)

Creates and returns a new Youri::Package object.

Warning: do not call directly, call subclass constructor instead.

get_pattern($name, $version, $release, $arch)

Returns a pattern matching a file for a package, using available informations.

compare_versions($version1, $version2)

Compares $version1 and $version2, and returns a numeric value:

> 0 if $version1 > $version2
0 if $version1 = $version2
< 0 if $version1 < $version2

compare_ranges($range1, $range2)

Compares $range1 and $range2, and returns a true value if they are compatible.

INSTANCE METHODS

get_name()

Returns the name of this package.

get_version()

Returns the version of this package.

get_release()

Returns the release of this package.

get_arch()

Returns the architecture of this package.

get_revision_name()

Returns the revision name of this package (name-version-release).

get_full_name()

Returns the full name of this package (name-version-release.arch).

get_file_name()

Returns the file name of this package (name-version-release.arch.extension).

get_file()

Returns the file containing this package.

is_source()

Returns true if this package is a source package.

is_binary()

Returns true if this package is a binary package.

get_type()

Returns the type (binary/source) of this package.

get_age()

Returns the age of this package

get_url()

Returns the URL of this package

get_summary()

Returns the summary of this package

get_description()

Returns the description of this package

get_packager()

Returns the packager of this package.

get_source_package()

Returns the name of the source package of this package.

get_tag($tag)

Returns the value of tag $tag of this package.

get_canonical_name()

Returns the canonical name of this package, shared by its multiple components, usually the one from the source package.

get_requires()

Returns the list of dependencies required by this package, each dependency being represented as an array reference, with the following informations:

name

Name of the dependency (index DEPENDENCY_NAME)

range

Range of the dependency (index DEPENDENCY_RANGE)

For more conveniency, fields index are available as constant in this package.

get_provides()

Returns the list of dependencies provided by this package, each dependency being represented as an array reference, using the same structure as previous method.

get_obsoletes()

Returns the list of other packages obsoleted by this one, each one being represented as an array reference, using the same structure as previous method.

get_conflicts()

Returns the list of other packages conflicting with this one.

get_files()

Returns the list of files contained in this package, each file being represented as an array reference, with the following informations:

name

Name of the file (index FILE_NAME).

mode

Mode of the file (index FILE_MODE).

md5sum

Md5sum of the file (index FILE_MD5SUM).

For more conveniency, fields index are available as constant in this package.

get_gpg_key()

Returns the gpg key id of package signature.

get_information()

Returns formated informations about the package.

get_changes()

Returns the list of changes for this package, each change being represented as an array reference, with the following informations:

author

Author of the change (index CHANGE_AUTHOR).

time

Time of the change (index CHANGE_TIME).

text

Textual description of the change, as as array reference of individual changes (index CHANGE_TEXT).

For more conveniency, fields index are available as constant in this package.

get_last_change()

Returns the last change for this package, as as structure described before.

compare($package)

Compares release ordering with other package.

sign($name, $path, $passphrase)

Signs the package with given name, keyring path and passphrase.

extract()

Extract package content in local directory.

SUBCLASSING

All instances methods have to be implemented.

COPYRIGHT AND LICENSE

Copyright (C) 2002-2006, YOURI project

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

<<