summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2015-07-05 14:32:35 +1000
committerAllan McRae <allan@archlinux.org>2015-07-12 16:23:25 +1000
commitff487212a2701c6a9755acb3ea8e75764eed9488 (patch)
tree3a5f9c8b1e0be185645be169392f6d74cc541097
parent2e5e496eb0936cae7ea8d2b38417feae3ba56881 (diff)
downloadpacman-ff487212a2701c6a9755acb3ea8e75764eed9488.tar.xz
Do not warn about downgrades when only downloading package
Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--lib/libalpm/add.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index e6081074..2684e94f 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -90,7 +90,7 @@ int SYMEXPORT alpm_add_pkg(alpm_handle_t *handle, alpm_pkg_t *pkg)
_alpm_log(handle, ALPM_LOG_WARNING, _("%s-%s is up to date -- reinstalling\n"),
localpkgname, localpkgver);
}
- } else if(cmp < 0) {
+ } else if(cmp < 0 && !(trans->flags & ALPM_TRANS_FLAG_DOWNLOADONLY)) {
/* local version is newer */
_alpm_log(handle, ALPM_LOG_WARNING, _("downgrading package %s (%s => %s)\n"),
localpkgname, localpkgver, pkgver);