From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] Build newest versions unless specified, and upgrades. Date: Wed, 13 Feb 2013 22:04:50 +0100 Message-ID: <87y5eskjrh.fsf@gnu.org> References: <87vc9yxcre.fsf@tines.lan> <8738x1xrek.fsf@tines.lan> <87vc9xqpd6.fsf@tines.lan> <201302122204.54359.andreas@enge.fr> <87liatp5tl.fsf@gnu.org> <87d2w4iit9.fsf_-_@tines.lan> <87zjz8h260.fsf@tines.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:59311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5jVq-00036V-7E for bug-guix@gnu.org; Wed, 13 Feb 2013 16:05:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U5jVk-0005ee-EP for bug-guix@gnu.org; Wed, 13 Feb 2013 16:05:06 -0500 Received: from [2a01:e0b:1:123:ca0a:a9ff:fe03:271e] (port=40360 helo=xanadu.aquilenet.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5jVk-0005YZ-7c for bug-guix@gnu.org; Wed, 13 Feb 2013 16:05:00 -0500 In-Reply-To: <87zjz8h260.fsf@tines.lan> (Mark H. Weaver's message of "Wed, 13 Feb 2013 06:40:55 -0500") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Mark H Weaver Cc: bug-guix@gnu.org Mark H Weaver skribis: > I wrote: >> Here's a preliminary patch that does two things: >> >> * Changes 'guix-build' and 'guix-package --install' so that only the >> newest packages will be considered (unless a version number is >> specified). >> >> * Implements 'guix-package --upgrade'. >> >> Although I'm not aware of any functional problems with this code, I'm >> not entirely pleased with its organization. Nonetheless, I wanted to >> make it available for early testing and comments. >> >> I welcome suggestions on how to improve this code. > > Sorry, that patch had a problem in guix-build. Here's a fixed version. I haven=E2=80=99t actually tested, but it looks good to me! I could have left =E2=80=98guix-build=E2=80=99 as is, because hackers shoul= d really use -e when they want something specific, but I=E2=80=99m fine either way. Could you update the doc, under =E2=80=9CInvoking guix-package=E2=80=9D, st= ating what happens when giving a package name without a version number? Minor remarks: > +(define (find-newest-available-packages) > + "Return a vhash with elements of the form > + (name newest-version newest-package ...) > +where the preferred package is listed first." What about something like this: Return a vhash keyed by package names, and with associated values of the form (newest-version newest-package) > + (define (upgradeable? name current-version current-path) > + ;; Return #t if there is a newer version available, or if the > + ;; newest version if the same as the current one but the > + ;; output path would be different than the current path. Try to mention the variables here, like: Return #t if there=E2=80=99s a version of package NAME newer than CURRENT-VERSION ... Other than that, please push! Thanks, Ludo=E2=80=99.