X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail-ee0-f51.google.com (mail-ee0-f51.google.com [74.125.83.51]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id D3014DC0276 for ; Fri, 28 Jun 2013 10:55:44 +0000 (UTC) Received: by mail-ee0-f51.google.com with SMTP id e52so942312eek.38 for ; Fri, 28 Jun 2013 03:55:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:in-reply-to:references :x-mailer:mime-version:content-type:content-transfer-encoding; bh=+piG6gVlJnUHyQhXk51HVPAHiBl2dIUc0yz7J8zV/dg=; b=I+eoC25aKAjR8B+7kmARe7CtIkqauDlaskY7M4OxVsjb8Att+AYcvMqM/G//89QHU9 GE1qRQxuQj5kn90htpJGwAl19Fb2SPrtuq5PfSdxDA9hj9cCow6zNTDLLAvaObU4VD3E CG7neZ8g5c31yvL1rAeCwKAHkyDGJ0cHInJqHTD0yOqAamSFgLSc1VV8MQnfiOTp9fra tZI5EL2Zp/VWEseL/uVZADRE+KwA3yPJu0ByGphLNav+37sIoQ5739L0CJ+SfNb16w9M qRQVt03ZzuqXgVwRTxINGqRXRn7BrNEEpF90kRX5EGM1mXSdG5GDEWshyo3fbi81V0A4 9Jqw== X-Received: by 10.14.149.2 with SMTP id w2mr12455846eej.126.1372416943060; Fri, 28 Jun 2013 03:55:43 -0700 (PDT) Received: from vostro ([83.145.235.199]) by mx.google.com with ESMTPSA id bj46sm9756838eeb.13.2013.06.28.03.55.42 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 28 Jun 2013 03:55:42 -0700 (PDT) Sender: =?UTF-8?Q?Timo_Ter=C3=A4s?= Date: Fri, 28 Jun 2013 13:55:54 +0300 From: Timo Teras To: Natanael Copa Cc: Dubiousjim , alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] [PATCH 05/15] reword upgrade messages Message-ID: <20130628135554.1a20f14e@vostro> In-Reply-To: <20130628113101.0e552bd3@ncopa-desktop.alpinelinux.org> References: <20130628113101.0e552bd3@ncopa-desktop.alpinelinux.org> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.17; i686-pc-linux-gnu) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 28 Jun 2013 11:31:01 +0200 Natanael Copa wrote: > On Thu, 27 Jun 2013 15:28:50 -0400 > Dubiousjim wrote: > > I think there have been bugs recently that has made apk perform the > self upgrade at 'random'. The self-upgrade should only happen when > apk-tools or one of its dependencies are upgraded. Maybe it should > self-upgrade only when apk-tools itself needs upgrade. (dependencies > should be ABI compat so they should not have any effect on the result) Yes, the new solver code is better at this. There is still situations when dependencies need to get upgraded. E.g. new apk-tools depends on libc>=something. And that needs libc upgrade to get satisfied. > > src/upgrade.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/src/upgrade.c b/src/upgrade.c > > index 9eb7890..0d7155a 100644 > > --- a/src/upgrade.c > > +++ b/src/upgrade.c > > @@ -64,7 +64,7 @@ int apk_do_self_upgrade(struct apk_database *db, > > unsigned short solver_flags) goto ret; > > > > if (apk_flags & APK_SIMULATE) { > > - apk_warning("This simulation is not reliable as > > apk-tools upgrade is available."); > > + apk_warning("This simulation is not reliable if > > apk-tools upgrade is available."); goto ret; > > } > > > > I think this warning will/should only be displayed when it would > perform a self-upgrade. Proper warning would probably be: > > "This simulation is not reliable as apk-tools or its dependencies > would be upgraded". Agreed. > Or even better, make apk upgrade ignore when an apk-tools dependency > is upgraded and only perform self-upgrade when apk-tools itself only > is upgraded. Not fully possible. It is possible to change that during self-upgrade the installed versions of dependencies are preferred. This would in practice mean: --- a/src/upgrade.c +++ b/src/upgrade.c @@ -51,7 +51,7 @@ int apk_do_self_upgrade(struct apk_database *db, unsigned short solver_flags) int r; name = apk_db_get_name(db, APK_BLOB_STR("apk-tools")); - apk_solver_set_name_flags(name, solver_flags, solver_flags); + apk_solver_set_name_flags(name, solver_flags, 0); db->performing_self_update = 1; r = apk_solver_solve(db, 0, db->world, &changeset); > > @@ -72,7 +72,7 @@ int apk_do_self_upgrade(struct apk_database *db, > > unsigned short solver_flags) apk_solver_commit_changeset(db, > > &changeset, db->world); apk_db_close(db); > > > > - apk_message("Continuing the upgrade transaction with new > > apk-tools:"); > > + apk_message("Continuing the upgrade transaction:"); > > for (r = 0; apk_argv[r] != NULL; r++) > > ; > > apk_argv[r] = "--no-self-upgrade"; --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---