summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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);