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. All meta characters in arguments are quoted.
get_unquoted_pattern($name, $version, $release, $arch)
Returns a pattern matching a file for a package, using available informations. Meta characters in arguments are not quoted.
compare_revisions($revision1, $revision2)
Compares two revision tokens, and returns a numeric value:
- positive if first revision is higher
- null if both revisions are equal
- negative if first revision is lower
check_ranges_compatibility($range1, $range2)
Returns a true value if given revision ranges are compatible.
INSTANCE METHODS
as_file()
Returns the file corresponding to this package.
as_string()
Returns a string representation of this package.
as_formated_string(format)
Returns a string representation of this package, formated according to format. Format is a string, where each %{foo} token will get replaced by equivalent tag value.
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_revision()
Returns the revision of this package.
get_arch()
Returns the architecture of this package.
get_file_name()
Returns the file name of this package (name-version-release.arch.extension).
is_source()
Returns true if this package is a source package.
is_binary()
Returns true if this package is a binary package.
is_debug()
Returns true if this package is a debug 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, as an array of Youri::Package::Relationship objects.
get_provides()
Returns the list of dependencies provided by this package, as an array of Youri::Package::Relationship objects.
get_obsoletes()
Returns the list of other packages obsoleted by this one, as an array of Youri::Package::Relationship objects.
get_conflicts()
Returns the list of other packages conflicting with this one, as an array of Youri::Package::Relationship objects.
get_files()
Returns the list of files contained in this package, as an array of Youri::Package::File objects.
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, as an array of Youri::Package::Change objects.
get_last_change()
Returns the last change for this package, as as structure described before.
compare($package)
Compares ordering with other package, according to their corresponding revision tokens, and returns a numeric value:
satisfy_range($range)
Returns a true value if this package revision satisfies given revision range.
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.
get_file()
Deprecated in favor of as_file().
get_full_name()
Deprecated in favor of as_string().
compare_versions($version1, $version2)
Deprecated in favor of compare_revisions().
compare_ranges($version1, $version2)
Deprecated in favor of check_ranges_compatibility().
get_revision_name()
Deprecated in favor of as_formated_string() with proper format string.
get_information()
Deprecated in favor of as_formated_string() with proper pattern.