diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2010-02-09 11:35:47 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2010-02-09 11:35:47 +0200 |
commit | a6c5d372af25043395a620d9c16652d1938d17ab (patch) | |
tree | 66b8ab35feba78b4af5263569111d5c24566baa9 /lib/psm.c | |
parent | a1377fcc7544acba04e67f40f5a2307ab04694ff (diff) | |
download | librpm-tizen-a6c5d372af25043395a620d9c16652d1938d17ab.tar.gz librpm-tizen-a6c5d372af25043395a620d9c16652d1938d17ab.tar.bz2 librpm-tizen-a6c5d372af25043395a620d9c16652d1938d17ab.zip |
Move rpmVersionCompare() into a more logical place
- it has nothing to do with psm so no point having it there
Diffstat (limited to 'lib/psm.c')
-rw-r--r-- | lib/psm.c | 21 |
1 files changed, 0 insertions, 21 deletions
@@ -60,27 +60,6 @@ struct rpmpsm_s { int nrefs; /*!< Reference count. */ }; -int rpmVersionCompare(Header first, Header second) -{ - /* Missing epoch becomes zero here, which is what we want */ - uint32_t epochOne = headerGetNumber(first, RPMTAG_EPOCH); - uint32_t epochTwo = headerGetNumber(second, RPMTAG_EPOCH); - int rc; - - if (epochOne < epochTwo) - return -1; - else if (epochOne > epochTwo) - return 1; - - rc = rpmvercmp(headerGetString(first, RPMTAG_VERSION), - headerGetString(second, RPMTAG_VERSION)); - if (rc) - return rc; - - return rpmvercmp(headerGetString(first, RPMTAG_RELEASE), - headerGetString(second, RPMTAG_RELEASE)); -} - /** * Macros to be defined from per-header tag values. * @todo Should other macros be added from header when installing a package? |