[pacman-dev] [PATCH] Do not warn about downgrades when only downloading package
Allan McRae
allan at archlinux.org
Sun Jul 5 04:33:03 UTC 2015
Signed-off-by: Allan McRae <allan at archlinux.org>
---
lib/libalpm/add.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index e608107..2684e94 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);
--
2.4.5
More information about the pacman-dev
mailing list