RPM::VersionCompare man page on Fedora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Fedora logo
[printable version]

RPM::VersionCompare(3)User Contributed Perl DocumentatioRPM::VersionCompare(3)

NAME
       RPM::VersionCompare - Compare RPM version strings

SYNOPSIS
	 use RPM::VersionCompare;
	 RPM::VersionCompare::rpmvercmp('1.0', '0.9');
	 RPM::VersionCompare::labelSplit('4:5.12.0-140');
	 RPM::VersionCompare::labelCompare('4:5.12.0-140', '5.14.1');

DESCRIPTION
       This module provides functions to compare RPM version strings. No
       function is exported by default. If possible, calls are passed to
       native librpm library.  Otherwise Python extension provided with RPM
       sources is re-implemented.

       labelCompare(LABEL1, LABEL2)
	       Compares two version strings including epoch and release.
	       Return 1 if LABEL1 is bigger, return 0 if LABEL1 equals to
	       LABEL2, return -1 otherwise.

       labelSplit(LABEL)
	       Splits a version LABEL (e.g. "4:5.12.0-140") into epoch,
	       version and release. The epoch and release parts are optional.
	       If they miss, the separator (collon for epoch, hyphen for
	       release) should miss too and their implicit value is 0. See
	       <http://www.rpm.org/wiki/PackagerDocs/Dependencies#RequiringPackages>
	       for specification.

	       If LABEL is in correct format, array (EPOCH, VERSION, RELEASE)
	       will be returned. Otherwise undef is returned.

       rpmvercmp(VERSION1, VERSION2)
	       Compares two RPM version strings by calling librpm function
	       rpmvercmp(). It does not support strings with RPM epoch or
	       release. (Use labelCompare() if you need to support epoch or
	       release.) It will return 1 if VERSION1 string is bigger, 0 if
	       strings are equal, and -1 if VERSION1 is lesser.

AUTHOR
       Petr PisaX <ppisar@redhat.com>

COPYING
       Copyright (C) 2011  Petr PisaX <ppisar@redhat.com>

       This program is free software: you can redistribute it and/or modify it
       under the terms of the GNU General Public License as published by the
       Free Software Foundation, either version 3 of the License, or (at your
       option) any later version.

       This program is distributed in the hope that it will be useful, but
       WITHOUT ANY WARRANTY; without even the implied warranty of
       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       General Public License for more details.

       You should have received a copy of the GNU General Public License along
       with this program.  If not, see <http://www.gnu.org/licenses/>.

perl v5.14.1			  2011-07-28		RPM::VersionCompare(3)
[top]

List of man pages available for Fedora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net