summaryrefslogtreecommitdiff
path: root/lib/psm.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-02-09 11:35:47 +0200
committerPanu Matilainen <pmatilai@redhat.com>2010-02-09 11:35:47 +0200
commita6c5d372af25043395a620d9c16652d1938d17ab (patch)
tree66b8ab35feba78b4af5263569111d5c24566baa9 /lib/psm.c
parenta1377fcc7544acba04e67f40f5a2307ab04694ff (diff)
downloadlibrpm-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.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/lib/psm.c b/lib/psm.c
index e56b1e6dc..fbfb4af1a 100644
--- a/lib/psm.c
+++ b/lib/psm.c
@@ -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?