[pacman-dev] [PATCH] Warn when synchronizing without upgrading (-Sy)
Dan McGee
dpmcgee at gmail.com
Wed Nov 17 21:59:36 CET 2010
On Wed, Nov 17, 2010 at 2:46 PM, Evangelos Foutras <foutrelis at gmail.com> wrote:
> Doing so can lead to broken applications after soname bumps, or major
> version upgrades like the transition to Python 3.
I have mixed feelings for sure on this. The intent is great, for
soure. But I do -Sy <pkg> a lot, knowing what is safe, what isn't.
This prompting would annoy the heck out of me. This also doesn't help
anyone that does an -Syu, cancels, and then later -S <anything>.
> ---
Side note- you sent another email; if you are just sending one patch
you can include those notes here below the '---' and it won't make it
into the final patch. So right here .:)
> 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 "
Too much going on in one if statement- I'd at least wrap it smarter
(before/after the &&, whatever is precedent), or make it nested
conditionals.
> + "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