index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Aaron Griffin <aaron@archlinux.org> | 2006-11-14 17:26:19 +0000 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2006-11-14 17:26:19 +0000 |
commit | 7d6161ccc33ce06566585fc56adf8e0ce2876658 (patch) | |
tree | 2154dac7833efafd1cce982fcb952f840a6e9ac9 /lib | |
parent | eb514bee967d396410e0647f5cd2a897cc619d0f (diff) |
-rw-r--r-- | lib/libalpm/package.c | 6 | ||||
-rw-r--r-- | lib/libalpm/sync.c | 2 |
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index 2686c00c..85d76151 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -459,6 +459,12 @@ int _alpm_pkg_splitname(char *target, char *name, char *version, int witharch) if((p = _alpm_pkgname_has_arch(tmp))) { *p = '\0'; } + if(witharch) { + /* trim architecture */ + if((p = _alpm_pkgname_has_arch(tmp))) { + *p = 0; + } + } p = tmp + strlen(tmp); diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index b7ebe6b4..52de2660 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -324,7 +324,7 @@ int _alpm_sync_addtarget(pmtrans_t *trans, pmdb_t *db_local, pmlist_t *dbs_sync, local = _alpm_db_get_pkgfromcache(db_local, spkg->name); if(local) { cmp = _alpm_versioncmp(local->version, spkg->version); - if(cmp > 0) { + if(cmp > 0 && !spkg->force) { /* local version is newer -- get confirmation before adding */ int resp = 0; QUESTION(trans, PM_TRANS_CONV_LOCAL_NEWER, local, NULL, NULL, &resp); |