index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Judd Vinet <judd@archlinux.org> | 2005-12-26 16:48:37 +0000 |
---|---|---|
committer | Judd Vinet <judd@archlinux.org> | 2005-12-26 16:48:37 +0000 |
commit | 6bd15469b1febef5d061905b0f7d8f69bf96a08f (patch) | |
tree | 11e64825a4aed1d4bfdf7306fdf36215acb57118 /lib/libalpm/add.c | |
parent | 58c9d5d66387821260ba9bdd0815568039462f39 (diff) |
-rw-r--r-- | lib/libalpm/add.c | 6 |
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); |