index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Chantry Xavier <shiningxc@gmail.com> | 2007-11-22 21:01:45 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-12-02 11:14:13 -0600 |
commit | 250331a636699561e1239e341f30f2adfebbcb43 (patch) | |
tree | 0a8ebd84f468ac9f9628d1257ed68d28713f3181 /lib/libalpm | |
parent | c15f7710deafe1b4fe9411381bd07cd0dbe8da48 (diff) |
-rw-r--r-- | lib/libalpm/alpm.h | 5 | ||||
-rw-r--r-- | lib/libalpm/sync.c | 17 |
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 335ce39e..1e18ad95 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -280,7 +280,8 @@ typedef enum _pmtransflag_t { PM_TRANS_FLAG_DOWNLOADONLY = 0x200, PM_TRANS_FLAG_NOSCRIPTLET = 0x400, PM_TRANS_FLAG_NOCONFLICTS = 0x800, - PM_TRANS_FLAG_PRINTURIS = 0x1000 + PM_TRANS_FLAG_PRINTURIS = 0x1000, + PM_TRANS_FLAG_NEEDED = 0x2000 } pmtransflag_t; /* Transaction Events */ @@ -321,7 +322,7 @@ typedef enum _pmtransconv_t { PM_TRANS_CONV_CONFLICT_PKG = 0x04, PM_TRANS_CONV_CORRUPTED_PKG = 0x08, PM_TRANS_CONV_LOCAL_NEWER = 0x10, - PM_TRANS_CONV_LOCAL_UPTODATE = 0x20, + /* 0x20 flag can go here */ PM_TRANS_CONV_REMOVE_HOLDPKG = 0x40 } pmtransconv_t; diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 5e58400f..f6b130d2 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -349,15 +349,14 @@ int _alpm_sync_addtarget(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sy local = _alpm_db_get_pkgfromcache(db_local, alpm_pkg_get_name(spkg)); if(local) { if(alpm_pkg_compare_versions(local, spkg) == 0) { - /* spkg is NOT an upgrade, get confirmation before adding */ - if(!(trans->flags & PM_TRANS_FLAG_PRINTURIS)) { - int resp = 0; - QUESTION(trans, PM_TRANS_CONV_LOCAL_UPTODATE, local, NULL, NULL, &resp); - if(!resp) { - _alpm_log(PM_LOG_WARNING, _("%s-%s is up to date -- skipping\n"), - alpm_pkg_get_name(local), alpm_pkg_get_version(local)); - return(0); - } + /* spkg is NOT an upgrade */ + if(trans->flags & PM_TRANS_FLAG_NEEDED) { + _alpm_log(PM_LOG_WARNING, _("%s-%s is up to date -- skipping\n"), + alpm_pkg_get_name(local), alpm_pkg_get_version(local)); + return(0); + } else { + _alpm_log(PM_LOG_WARNING, _("%s-%s is up to date -- reinstalling\n"), + alpm_pkg_get_name(local), alpm_pkg_get_version(local)); } } } |