Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/add.c
diff options
context:
space:
mode:
authorJudd Vinet <judd@archlinux.org>2005-12-26 16:48:37 +0000
committerJudd Vinet <judd@archlinux.org>2005-12-26 16:48:37 +0000
commit6bd15469b1febef5d061905b0f7d8f69bf96a08f (patch)
tree11e64825a4aed1d4bfdf7306fdf36215acb57118 /lib/libalpm/add.c
parent58c9d5d66387821260ba9bdd0815568039462f39 (diff)
renamed rpmvercmp to versioncmp, added some fixes from isteve@bofh.cz
Diffstat (limited to 'lib/libalpm/add.c')
-rw-r--r--lib/libalpm/add.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 689172c5..e382fa14 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -35,7 +35,7 @@
#include "error.h"
#include "list.h"
#include "cache.h"
-#include "rpmvercmp.h"
+#include "versioncmp.h"
#include "md5.h"
#include "log.h"
#include "backup.h"
@@ -137,7 +137,7 @@ int add_loadtarget(pmtrans_t *trans, pmdb_t *db, char *name)
if(trans->flags & PM_TRANS_FLAG_FRESHEN) {
/* only upgrade/install this package if it is already installed and at a lesser version */
dummy = db_get_pkgfromcache(db, pkgname);
- if(dummy == NULL || rpmvercmp(dummy->version, pkgver) >= 0) {
+ if(dummy == NULL || versioncmp(dummy->version, pkgver) >= 0) {
pm_errno = PM_ERR_PKG_CANT_FRESH;
goto error;
}
@@ -149,7 +149,7 @@ int add_loadtarget(pmtrans_t *trans, pmdb_t *db, char *name)
for(i = trans->packages; i; i = i->next) {
pmpkg_t *pkg = i->data;
if(strcmp(pkg->name, pkgname) == 0) {
- if(rpmvercmp(pkg->version, pkgver) < 0) {
+ if(versioncmp(pkg->version, pkgver) < 0) {
_alpm_log(PM_LOG_WARNING, "replacing older version of %s %s by %s in target list", pkg->name, pkg->version, pkgver);
FREEPKG(i->data);
i->data = pkg_load(name);