From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] guix package: Add '--do-not-upgrade' option Date: Tue, 14 Apr 2015 11:57:05 +0200 Message-ID: <87h9sjghhq.fsf@gnu.org> References: <87wq1fb382.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59061) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yhxaj-00058V-70 for guix-devel@gnu.org; Tue, 14 Apr 2015 05:57:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yhxad-0005cX-L3 for guix-devel@gnu.org; Tue, 14 Apr 2015 05:57:13 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41191) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yhxad-0005cT-Iw for guix-devel@gnu.org; Tue, 14 Apr 2015 05:57:07 -0400 In-Reply-To: <87wq1fb382.fsf@netris.org> (Mark H. Weaver's message of "Tue, 14 Apr 2015 03:04:13 -0400") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Mark H Weaver Cc: guix-devel@gnu.org Mark H Weaver skribis: > This adds a --do-not-upgrade option to 'guix package'. > One issue is that if you write: > > guix package -u --do-not-upgrade icecat > > then this will be interpreted as: > > guix package -u icecat --do-not-upgrade > > The reason is that -u is specified as taking an optional argument, and > it will take one even if it comes after some other options. > > We could fix this by specifying that -u/--upgrade does _not_ take an > optional argument, instead relying on the 'arg-handler' logic to > interpret arguments. The downside is that this would no longer be > allowed: > > guix package --upgrade=3D > > instead it would have to be written without the '=3D', like this: > > guix package --upgrade > > What do you think? I have a slight preference for keeping --upgrade unchanged. > Anyway, here is my current patch which still has the issue described > above, so you must write "guix package -u . --do-not-upgrade icecat". Or =E2=80=9Cguix package --do-not-upgrade icecat -u=E2=80=9D. > From 1ddc901ae8bbe0bb0b41b380a1f2c1c368602beb Mon Sep 17 00:00:00 2001 > From: Mark H Weaver > Date: Thu, 26 Mar 2015 17:25:09 -0400 > Subject: [PATCH] guix package: Add '--do-not-upgrade' option. > > * guix/scripts/package.scm (%options): Add the '--do-not-upgrade' option. > (show-help): Document it. > (options->installable): Add 'do-not-upgrade-regexps' variable. > Use it in 'packages-to-upgrade'. > * doc/guix.texi (Invoking guix package): Document the '--do-not-upgrade' > option. Otherwise LGTM. This is a welcome addition! Thanks, Ludo=E2=80=99.