[pacman-dev] [PATCH] Warn when synchronizing without upgrading (-Sy)
Evangelos Foutras
foutrelis at gmail.com
Wed Nov 17 21:46:23 CET 2010
Doing so can lead to broken applications after soname bumps, or major
version upgrades like the transition to Python 3.
---
src/pacman/sync.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index f9d12e4..e7b7628 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -805,6 +805,14 @@ int pacman_sync(alpm_list_t *targets)
}
if(config->op_s_sync) {
+ /* Warn the user when synchronizing the package databases without also
+ * performing a full upgrade. */
+ if (!config->op_s_upgrade && !noyes(_(":: Synchronizing the package "
+ "databases without also performing a full upgrade \n"
+ ":: can lead to software incompatibilities. "
+ "Continue anyway?"))) {
+ return(0);
+ }
/* grab a fresh package list */
printf(_(":: Synchronizing package databases...\n"));
alpm_logaction("synchronizing package lists\n");
--
1.7.3.2
More information about the pacman-dev
mailing list